Cross-site field value
Hello,
I'm using a cross-site lookup field in one list(A) that looksup a value on another list(B).
On the list A in the new form I am trying to get the value of this lookup field using javascript when user choose a value from this field.
If I try fd.field('CrossSiteLookup').value() I get a number but in the form display name is shown. When I look this column using SP CAML Query Helper I get entries like this, "123;# Display Name". As I said if I use fd.field('CrossSiteLookup').value() I get 123, but I want to get "Display Name". How can I achieve this ?
Thanks in advance.
I'm using a cross-site lookup field in one list(A) that looksup a value on another list(B).
On the list A in the new form I am trying to get the value of this lookup field using javascript when user choose a value from this field.
If I try fd.field('CrossSiteLookup').value() I get a number but in the form display name is shown. When I look this column using SP CAML Query Helper I get entries like this, "123;# Display Name". As I said if I use fd.field('CrossSiteLookup').value() I get 123, but I want to get "Display Name". How can I achieve this ?
Thanks in advance.
Hello! If you have a single-value CSL field use:
If you have a multi-value CSL field:
where index is a number starting from 0 that indicates the position of the value in the field you're trying to access Please note, that if you try to access an entry with no Title property (an empty entry), you'll get an exception.
Code: Select all
fd.field('CrossSiteLookup').control('data')['Title']
Code: Select all
fd.field('CrossSiteLookup').control('data')[index]['Title']
-
- Information
-
Who is online
Users browsing this forum: No registered users and 18 guests