cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MartinSun2000
Helper II
Helper II

Update a SharePoint item with lookup table or choice using a text serach

I have created a flow to trigger update of a SharePoint record when an Excel file is updated. But the content to be updated in the SharePoint list is an item with lookup table or choice, can a search be applied to that lookup table or choice based on what was passed from the Excel file value, which is simply a string?

Following is the flow I build, and the filed that is to be updated. Screen1.PNG

For example, when updating the Inspector ID field, can a function be called to look for a value that contains "Peter"? And "Peter" is passed in from the get record of the Excel file. 

screen2.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
v-alzhan-msft
Community Support
Community Support

Hi @MartinSun2000 ,

 

Sorry for if you want to update the lookup field in the sharepoint list with the value from the excel row, I'm afraid that there is no ant way to achieve the requirement.

Since we could only update the lookup field by choosing from the drop down list or update it with the custom id such as 0,or 1,0r 2...

so if you want to update the field to Peter, you need to know the id for the Peter choice.

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
sudharsan1985
Solution Sage
Solution Sage

Hi @MartinSun2000 

Yes you can use the 'Get Items' action filter query to filter the items based on the data from the excel. If you have to search for a choice field, then you can pass the value directly to field name. If you are trying to search for lookup field, make sure whether you are searching for lookup using value or id. The filter expression should be like the below.

"Internal_Field_Name/Lookup_field_internal_name eq 'Data from Excel'"

 

Hope it helps, please like it or mark it as a solution if it resolves ur clarification or issue
-Sudharsan K...

Hope it helps, please like it or mark it as a solution if it resolves your clarification or issue
-Sudharsan K...

Thank you for the quick response. But please excuse my ignorance, where do I exactly enter the code? Like here? Doesn;t seem to accept it. 

scren3.PNG

Inspector is the lookup table name, Name is the filed to search for, and I am trying to copy the field passed into this process from Excel, could not directly choose it from the select dynamic item menu. 

 

v-alzhan-msft
Community Support
Community Support

Hi @MartinSun2000 ,

 

Sorry for if you want to update the lookup field in the sharepoint list with the value from the excel row, I'm afraid that there is no ant way to achieve the requirement.

Since we could only update the lookup field by choosing from the drop down list or update it with the custom id such as 0,or 1,0r 2...

so if you want to update the field to Peter, you need to know the id for the Peter choice.

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Kudoed Authors
Users online (1,549)