Assign value to Cross-site Lookup
So, I want to set the cross-site lookup field of Employee to the current user when they open the form.
Using Microsoft SP I am getting the logged in user, and querying my Employee list for the ID.
I attempt to set the value of my Employee cross-site lookup field with the ID but I think the
cross-site lookup is still populating and so it ignores to attempt to assign the ID.
Or
The cross-site lookup will not accept an ID for a list item that isn't in the list yet. I have the
list currently set to pull the default about of list items (10) at a time.
Any ideas or suggestions?
Using Microsoft SP I am getting the logged in user, and querying my Employee list for the ID.
I attempt to set the value of my Employee cross-site lookup field with the ID but I think the
cross-site lookup is still populating and so it ignores to attempt to assign the ID.
Or
The cross-site lookup will not accept an ID for a list item that isn't in the list yet. I have the
list currently set to pull the default about of list items (10) at a time.
Any ideas or suggestions?
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
Hello,
You can assign ID to Cross-site Lookup but its display value will not appear in the control. In this case you can hide Cross-site Lookup field and set its value in the specific ID with JavaScript.
Another option is to set ID with display value if you know it. The following example is valid for Cross-site Lookup with single value:
You can find more samples in the following entry
http://spform.com/forms-designer- ... eld-values
You can assign ID to Cross-site Lookup but its display value will not appear in the control. In this case you can hide Cross-site Lookup field and set its value in the specific ID with JavaScript.
Another option is to set ID with display value if you know it. The following example is valid for Cross-site Lookup with single value:
Code: Select all
fd.field('InternalName').control().value({Id: 1, Title: 'Display text'});
http://spform.com/forms-designer- ... eld-values
-
- Information
-
Who is online
Users browsing this forum: No registered users and 21 guests