Show contenttype column with vLookup

Forums vLooup for SharePoint Show contenttype column with vLookup

Viewing 2 reply threads
  • Author
    Posts
    • #18829
      Andreas Blüher
      Participant

      Hello Alexander,

      I’m trying to show the content type column for tasks loaded using vLookup. As shown on the first screenshot we get an error message. On the 2nd screenshot you can see the configuration.

      If I use a wrong field name the error message is different, so I’m wondering if ContentType is a special column or if I’m doing something wrong.

      Thank you very much!
      Andreas

    • #18869
      Alexander Bautz
      Keymaster

      It doesn’t look like the content type name is accessible directly, but you can get it by using a custom function. Set up the vLookup field as the attached image, and add this to the custom js:

      function getContentTypeName(val,item){
         return item.get_contentType().get_name();
      }

      Alexander

    • #18919
      Andreas Blüher
      Participant

      Hello Alexander,

      I just wanted to let you know that your code works like a charm. Thank you very much again.

      Have a nice weekend
      Andreas

Viewing 2 reply threads
  • You must be logged in to reply to this topic.