Hi Community!
I have an excel table and a Sharepoint list. I want to update Sharepoint list if a column of excel show a particular value.
For example:
The excel table is like:
Employee ID | Need to update Sharepoint list item | ... |
001 | Yes | ... |
002 | Yes | ... |
003 | No | ... |
The Sharepoint list is like:
Employee ID | Column 1 | Column 2 | ... |
001 | Successful | Pending | ... |
002 | Successful | Pending | ... |
003 | ... |
If "Need to update Sharepoint list item" value of each record is equal to "Yes", update the correspondent employee id sharepoint list Column 1 to Successful, Column 2 to Pending. Since the trigger is recurrence (do at 10 am every workday), so need to check if the Sharepoint list items have updated before.
This is the flow I've created.
[Condition] is Employee ID in excel is equal to Employee ID in Sharepoint list.
[Condition 2] is Column 1 in Sharepoint list is equal to empty.
But I found that the [Condition] are always false in Condition, so the following actions skipped. How do I modify the current flow?
Condition:
Hi @etham_meng ,
My Excel Table:
My SharePoint List:
1)I recommend that you recreate the flow and go to the classic designer to avoid unnecessary loops.
My Flow Run History:
2)I observed that the column names in your SharePoint list all contain spaces, this time the display name of the column is not the same as the internal name, we need to use the internal name of the column in the OData Filter of Get items, here are the steps to view the internal name of the column.
My Flow Configuration Parameter:
InternalName eq '@{items('Apply_to_each')?['Employee ID']}' and InternalName eq null
length(outputs('Get_items')?['body/value'])
When you use the expression I provided, please replace the 'InternalName' with the internal name of your own column, as we don't have the same internal name.
Best Regards,
Sunshine Gu
You could ignore List row present in email list, I forgot to delete.
Hi @etham_meng ,
Why did you add two list rows present in a table?
What do these two identical actions do?
Best Regards,
Sunshine Gu
Hi @etham_meng
I would suggest using "Filter array" action instead of nested loop. Iterate SharePoint items in a loop and then use filter array action for each item to filter emp id from the output value object of "List rows present in a table". To check if row exists, use an expression and apply length() function to calculate the length of output array returns by filter array action.
If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.
WarrenBelz
146,731
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,079
Most Valuable Professional