I got this Lookup column in SP list that i've imported into powerapps into a form, I made the box IsSearchable=True and I can search, it works.
But can I somewhere insert more "Keyword" so the search gets better?
Example:
If I have to search for "Mr. Berta Jonsson" I have to type "Mr." If I type "Berta Jonsson" I wont get any results, just blank.
Solved! Go to Solution.
@Anonymous
Yes, you can do that. You have to do two more things though for it to work properly.
1) Set the Default. You will want to have any previous value appear if you edit a record, so, to get that to work, you will need to set the DefaultSelectedItems property of the Combobox to Filter(yourLookupList, ID=ThisItem.Cards.Id)
2) You will need to set the UpdateProperty of your DataCard to the following:
{
Value: yourComboBox.Selected.Title,
Id: yourComboBox.Selected.ID,
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"
}
Substitute the name of your combobox, and the Title to whatever field you have defined in SharePoint to use from the Lookup list.
@Anonymous
In order to find those kind of results, you need to incorporate either Search or IN functions. Neither of these are delegable to SharePoint - only StartsWith (and thus the results you see).
Depending on the size of your datasource and the possibility of reducing the results to a subset (i.e. perhaps you only need to search like this on a small range of records), the delegation issue can be worked around.
If you have any formulas or screenshots to explain your scenario further, please share.
I hope this is helpful for you.
@RandyHayes Hello and thanks for the reply!
Its a small record, contains only 340 items.
Its a DatacardValue in a form in powerapps, its the type combobox and its searchable.
Items property is:
Choices([@'Logg'].Cards)
Searchfield:
["Value"]
IsSearchable:
true
@Anonymous
Ah got it...I did not get that this was a ComboBox.
Yes, a ComboBox *should* be doing exactly what you want.
In your scenario, what happens if you just type in Norra - does it give you results?
Here is the ComboBox with searching as it should be:
Unfortunately that doesnt work for me. This column is a lookup column in sharepoint list, its connected to another list on sharepoint. When I insert it into a form in powerapps it says its a combobox in powerapps. I try to just search for "Norra" but it doesnt work...
@Anonymous
Ah, it's a lookup column. Yes you will have the results you are seeing with them due to the nature of them being complex data types in SharePoint.
I would recommend that you add the list that is defined for the Lookup column to your App and then base your ComboBox on that list rather than on Choices.
Alright I understand. Can I put this new combobox into my form and patch that field somehow also?
@Anonymous
Yes, you can do that. You have to do two more things though for it to work properly.
1) Set the Default. You will want to have any previous value appear if you edit a record, so, to get that to work, you will need to set the DefaultSelectedItems property of the Combobox to Filter(yourLookupList, ID=ThisItem.Cards.Id)
2) You will need to set the UpdateProperty of your DataCard to the following:
{
Value: yourComboBox.Selected.Title,
Id: yourComboBox.Selected.ID,
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"
}
Substitute the name of your combobox, and the Title to whatever field you have defined in SharePoint to use from the Lookup list.
User | Count |
---|---|
160 | |
93 | |
81 | |
74 | |
58 |
User | Count |
---|---|
195 | |
166 | |
99 | |
95 | |
79 |