I want to find a value in another sharepoint list based on a value in a drop-down list.
I write in the "input text":
LookUp ('Choice - OTP'; OTP = DataCardValue3.Selected.Value; Sites)
but the result is empty. I think the writing is wrong.
Can you help me ?
Solved! Go to Solution.
For your lookup to work, the lookup list must be in the app as a datasource. Lookup() function has 3 elements,
If no item matches the formula, then it will be blank. The third element is optional and if left out, the result will be a single record. If the third item is specified, then the column value in the selected record will be returned. For more information about the Lookup() function please see the documentation canvas-apps/functions/function-filter-lookup
Do you want to the input text based on the dropdown selected item?
What columns' types of the columns in your SP list?
You can try the following test. I test with two SP lists.
SP1:'2019Cities' (list name)
SP2:'2019test' (list name)
LookUpCities(look up column type, look up from SP1's Cities)
(the green ones means the controls' names, datasource name and column names on my side, you can change to yours on your side)
On your side:
LookUp ('Choice - OTP', OTP = DataCardValue3.Selected.Value).Sites
Hope this could be helpful.
Hi @v-yuxima-msft ,
1 - Yes I want that the input text based on the dropdown selected item
2 - I have 2 lists :
- List Choix-OTP with column OTP (Single line) and Sites (Lookup)
- List BDD-FNC with column OTP (Lookup based on Choix-OTP) and Site (Single line)
I want that the column Site in the list "BDD-FNC" is equal to the column Sites in the list "Choix-OTP" based on the column OTP in the list "BDD-FNC".