Property in UserProfile has a “-” but JS won’t recognize

Forums Classic DFFS Property in UserProfile has a “-” but JS won’t recognize

Tagged: 

Viewing 1 reply thread
  • Author
    Posts
    • #34999
      Paul Heffner
      Participant

      One of the properties I can see in concole is “Band-Level” but thw following code doesn’t recognize it. If I use any property with no – it works fine but adding “Band-Level” makes it error.

      `function populateBand() {

      // Use this code in NewForm or EditForm

      $.each(spjs.utility.getFieldValue({“fin”:”Band_4_Approval”,”key”:”loginName”}),function(i,login){

      //var ppData = spjs.utility.userInfo(login);

      //console.log(ppData);

      // User profile is not available in SP Foundation

      var userProfile = spjs.utility.userProfile(login);

      console.log(userProfile);

      setFieldValue(“Approver_Band”,userProfile.Band-Level);

      });

      }

    • #35010
      Alexander Bautz
      Keymaster

      Write it like this:

      userProfile["Band-Level"]

      Alexander

Viewing 1 reply thread
  • You must be logged in to reply to this topic.