cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Unity
Frequent Visitor

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
Community Support
Community Support

Re: SharePoint List Item Create/Update (Condition failure)

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

3 REPLIES 3
Dual Super User
Dual Super User

Re: SharePoint List Item Create/Update (Condition failure)

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!



Unity
Frequent Visitor

Re: SharePoint List Item Create/Update (Condition failure)

@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

Community Support
Community Support

Re: SharePoint List Item Create/Update (Condition failure)

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

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (7,065)