cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
StephaneVedren
Level: Powered On

SharePoint List: Item Created Or Modified with condition


Hi, 

I am trying to create a flow between two sharepoint lists.

when an item is created or modified in the first, I get items of the second with discrimination on the "title" which is unique. So normally I'm sure to have just one answer or no answer.

Depending on the presence or absence of an item I want to create a new item or updates the existing one.
To do this I make a condition on "value" "is different from" "null" but apparently even when there is no entry that matches "value" is not empty and it always on "if not"
I'm interested in a good idea ...

Thank you.

Capture.JPG

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support Team
Community Support Team

Re: SharePoint List: Item Created Or Modified with condition

Hi @StephaneVedren,

 

Do you want to create or update items based on Title?

Please make sure that Title is the only value, which is the basis for updating or creating an item.

  • First configure Get items-Filter query, according to Title to check whether there is already the same title item in list 2.
  • Use length() function in Condition to determine if Get items have eligible items.
  • If the result is 0, a new item is created in the list; if the result is not, the item of the same title is updated.

Image reference:

                   12.PNG

@equals(length(body('Get_items')?['value']), 0)

13.PNG

Please take a try.

 

Best Regards,

Community Support Team _ Barry
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
Highlighted
Community Support Team
Community Support Team

Re: SharePoint List: Item Created Or Modified with condition

Hi @StephaneVedren,

 

Do you want to create or update items based on Title?

Please make sure that Title is the only value, which is the basis for updating or creating an item.

  • First configure Get items-Filter query, according to Title to check whether there is already the same title item in list 2.
  • Use length() function in Condition to determine if Get items have eligible items.
  • If the result is 0, a new item is created in the list; if the result is not, the item of the same title is updated.

Image reference:

                   12.PNG

@equals(length(body('Get_items')?['value']), 0)

13.PNG

Please take a try.

 

Best Regards,

Community Support Team _ Barry
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

StephaneVedren
Level: Powered On

Re: SharePoint List: Item Created Or Modified with condition

thank you very much it works fine.
I was missing the function "length".
Flow's function formulas are not very simple for non-computer scientists ...

Are there any books to help us?
In any case I thank you for your responsiveness.

 

Stephane

Community Support Team
Community Support Team

Re: SharePoint List: Item Created Or Modified with condition

Hi @StephaneVedren ,

 

Please check this link and see if it helps:

https://docs.microsoft.com/en-us/azure/logic-apps/workflow-definition-language-functions-reference

 

Best Regards,

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

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Speakers, submit your sessions now! Call for speakers ends Feb. 10!

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!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,632)