Cross-Site Lookup - Real-time quick search restriction
Is it possible to either use wildcards or search within the full name of a dropdown choice, rather than the search only matching the characters in sequence?
For example if a choice was:
An example dropdown choice
Typing 'choice' would include this in the real-time search results. Im using the Cross-site lookup on a site, which has dozens of choices on the dropdown, which would be a lot easier to use if it wasnt so unforgiving on what order the words are typed.
Thanks for your help.
For example if a choice was:
An example dropdown choice
Typing 'choice' would include this in the real-time search results. Im using the Cross-site lookup on a site, which has dozens of choices on the dropdown, which would be a lot easier to use if it wasnt so unforgiving on what order the words are typed.
Thanks for your help.
There are no wildcards, but there is a number of operators you can use with strings, like eq and substringof. For example, if you want to search for exact matches, change your request items function to resemble this one (go to Manage Plumsail Lookups -> select the lookup field -> Advanced settings -> request items):
As you can see, we using the eq (equals) operator to get exact matches only. To get the functionality of wildcards you can use the substringof operator or the startswith operator. For more information see this page https://msdn.microsoft.com/en-us/librar ... 42385.aspx.
Code: Select all
function (term, page) {
return "{WebUrl}/_api/web/lists('{ListId}')/items?$select=Id,{LookupField}&$orderby={LookupField}&$filter={LookupField} eq '" + encodeURIComponent(term) + "'&$top=10";
}
As you can see, we using the eq (equals) operator to get exact matches only. To get the functionality of wildcards you can use the substringof operator or the startswith operator. For more information see this page https://msdn.microsoft.com/en-us/librar ... 42385.aspx.
-
- Information
-
Who is online
Users browsing this forum: No registered users and 6 guests