cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resolver I
Resolver I

Update an list of Sharepoint item if a criterion is met

Hi all, 

I have a Sharepoint List with the following fields:

Table.png

 

 

 

 

 

 

The Regular Meeting happens nearly everyday, and all members will be joining. 

 

I'd like to setup a Flow that when anyone of the team members updated the Actual Hours of Regular Meeting of Today, then the other members' Actual Hours will be updated as of the value provided from the first one. 

 

I am trying with "When an item is created or modified", and successfully created a Condiition with:

formateDateTime(triggerBody()?['Assignment Date'], 'yyyy-MM-dd') is equal to formateDateTime(utcNow(), 'yyyy-MM-dd') 

AND

Title is equal to "Regular Meeting"

AND

triggerBody()?['Actual Hours'] > 0

 

But then, I am stuck to get the "Actual Hours" value to put it to the other members' records. Anyone can help? 

 

Thanks,

Gavin

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Update an list of Sharepoint item if a criterion is met

Hi @gavinleung,

 

Please have a test with the following configuration:

Annotation 2019-09-03 154254.png

Best Regards,
Community Support Team _ Lin Tu
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

15 REPLIES 15
Highlighted
Dual Super User III
Dual Super User III

Re: Update an list of Sharepoint item if a criterion is met

Hi @gavinleung 

 

Can you please share a screenshot of the flow configuration? Are you not getting the dynamic content for Actual Hours? Please share more details so that we may help you better.
 
Hope this helps!
 
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
Highlighted
Resolver I
Resolver I

Re: Update an list of Sharepoint item if a criterion is met

Here it is:

Flow cap.png

Highlighted
Community Support
Community Support

Re: Update an list of Sharepoint item if a criterion is met

Hi @gavinleung,

 

What's the error message you have received?

Could you share the error screenshot about the update item Action, please?

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

Highlighted
Resolver I
Resolver I

Re: Update an list of Sharepoint item if a criterion is met

It's not an error. 

 

Based on the Condition, the flow proceeds if the conditions return true. Do I need to use Apply to Each with the conditions (as the condition above) and update the items acccordingly ? 

 

Gavin

Highlighted
Community Support
Community Support

Re: Update an list of Sharepoint item if a criterion is met

Hi @gavinleung,

 

I make sense of your requirements. If the conditions return true, you should use Get items to get these items with the same Task, then add Apply to Each action to update the items get from Get items action.

For example:Annotation 2019-08-28 162205.png

Please have a try, I hope it can help you.

 

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

Highlighted
Resolver I
Resolver I

Re: Update an list of Sharepoint item if a criterion is met

Thanks @v-litu-msft , so can the filter be a multiple criteria such as:

Title = "Regular Meeting"

Date = today

 

 

Highlighted
Community Support
Community Support

Re: Update an list of Sharepoint item if a criterion is met

Hi @gavinleung,

 

Yes, it can, please have a reference to the following:

 

utcNow('MM-dd-yyyy')

 

reference#utcNow

To make sure the condition could be successful, you should make sure format of date is the same.Annotation 2019-08-28 173201.png

 

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

Highlighted
Resolver I
Resolver I

Re: Update an list of Sharepoint item if a criterion is met

Hi @v-litu-msft , thanks for your advice and I revisited this. 

 

I'm having difficulty in filtering from the ListFlow cap.png

I wanna filter and update those records with a specific string AND the record with date today. 

 

My Filter Query: Title eq '@{triggerBody()?['Title']}' AND '@{formatDateTime(triggerBody()?['AssignmentDate'], 'yyyy-MM-dd')} eq '@{formatDateTime(utcNow(),'yyyy-MM-dd')}'

 

Do I miss anything? Or I am completely wrong? 

 

I couldnt find much documentation on this filter query. 

 

Thanks,
Gavin

Highlighted
Community Support
Community Support

Re: Update an list of Sharepoint item if a criterion is met

Hi @gavinleung,

Please refer to the following multiple conditions Filter Query:

Annotation 2019-09-03 145819.png

 

column1 eq 'condition1' and column2 eq 'condtion2'

Please notice the and is "and", not "AND".

 

 

And your condition: Title eq '@{triggerBody()?['Title']}' AND '@{formatDateTime(triggerBody()?['AssignmentDate'], 'yyyy-MM-dd')} eq '@{formatDateTime(utcNow(),'yyyy-MM-dd')}'  have a addition single quota, please remove it. Then create the filter query:

Title eq '@{triggerBody()?['Title']}' and AssignmentDate eq 'utcNow('yyyy-MM-dd')'

Best Regards,

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

Highlighted
Resolver I
Resolver I

Re: Update an list of Sharepoint item if a criterion is met

Hi @v-litu-msft , I tried your but not successful. The flow failed to run...and no status showing at all:

Flow cap.png

I have no data where ran wrong. 

 

And btw my "AssignmentDate" field in Sharepoint List is a Date field with "9/3/2019" ('MM/dd/yyyy') format. Not sure if this is the issue causing an non-stop operation. 

Highlighted
Resolver I
Resolver I

Re: Update an list of Sharepoint item if a criterion is met

Hi @v-litu-msft , can see the error message this time:

Flow cap.png

 

The error message is: "message":

"The expression \"Title eq 'Visual Management Meeting' and AssignmentDate eq 'utcNow('yyyy-MM-dd')'\" is not valid.\r\nclientRequestId: 8d1d9130-c07d-4b7d-86bb-12a5b0f94e02\r\nserviceRequestId: 8d1d9130-c07d-4b7d-86bb-12a5b0f94e02"

Highlighted
Community Support
Community Support

Re: Update an list of Sharepoint item if a criterion is met

Hi @gavinleung,

 

Could you please share your Flow configuration?

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

Highlighted
Resolver I
Resolver I

Re: Update an list of Sharepoint item if a criterion is met

Highlighted
Community Support
Community Support

Re: Update an list of Sharepoint item if a criterion is met

Hi @gavinleung,

 

Please have a test with the following configuration:

Annotation 2019-09-03 154254.png

Best Regards,
Community Support Team _ Lin Tu
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

Highlighted
Resolver I
Resolver I

Re: Update an list of Sharepoint item if a criterion is met

Thanks @v-litu-msft , it works ! And I have done what I wanna to do ! 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Users online (5,062)