cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Unity
Helper I
Helper I

SharePoint List Item Create/Update (Condition failure)

Hi All,


I'm trying to create a flow that creates or updates items on my child SharePoint list depended on the parent SP list.

 

Here's what the process looks like (the bold is where the workflow begins):

 

User fills our MS form>Creates item in Parent SharePoint>Updates child SharePoint

 

Currently I'm using a condition which compares the title (email) column of both list. I want a condition where one of two happens:

 

If title (email) matches: Update/overwrite existing entry on child list.

If title (email) doesn't match (no entries listed): Create new line item.

 

I'm having an issue now, where no matter what I do, the condition is triggering as "false" and a new line item is created on the child list, even if there is an existing item to be overwritten with a matching title (email). I've tried switching the Update/Create with the Yes/No conditions and it still defaults to false and creates a new line item.

 

Would appreciate any help I can get on fixing this or creating a flow where responses will overwrite previous responses from unique users or create new ones if none exist.

Admittedly, I am not formula savy, so please expand a bit if that is required. Thanks so much!

Below is my current workflow:

 

1.PNG

2.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
v-alzhan-msft
Community Support
Community Support

Hi @Unity ,

 

 

Please refer to screenshot below to create the flow:

1.png

The expression in the Filter Query in the Get items action as below:

Title eq '@{triggerBody()?['Title']}'

 

The length expression in the Condition as below:

length(body('Get_items')?['value'])

 

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

4 REPLIES 4
efialttes
Super User
Super User

Hi!
How many items did you got in your child SP list?
By default 'Get items' response provides max 100 elements, if you have more than 100 and less than 5,000 you should assign a value to Top Count (max 5,000). If you have more than 5,000 you need to activate pagination.
https://alextofan.com/2019/08/22/how-to-get-more-than-5000-item-from-sharepoint-online-in-flow/
Please note you can also filter results, so your flow would execute faster
Hope this helps


Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



@efialttes 

 

Hi, I currently only have 2 items on the child list. The parent does have 150 entries. That wouldn't be the issue then with the low number count right?

Cheers

v-alzhan-msft
Community Support
Community Support

Hi @Unity ,

 

 

Please refer to screenshot below to create the flow:

1.png

The expression in the Filter Query in the Get items action as below:

Title eq '@{triggerBody()?['Title']}'

 

The length expression in the Condition as below:

length(body('Get_items')?['value'])

 

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.

Anonymous
Not applicable

works like magic, many thanx!!! 

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (5,472)