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

Update a SharePoint Item and increas a value

Hi,

 

i think it should be easy but i can't find the right hint. maybe you can help...

 

i have a flow, which ist triggered by a new item in a SharePoint List. The flow sends a email with the options yes, no, maybe (for each option there is a column (number) in the SharePoint list). There will be 5 similar flows like this and each will send a mail to a different recipient.

 

Now i would like to sum the results for the Item. like

yes:3

no:1

maybe:1

 

but i can's do any operations in the filed...

 

the use-Case:

Topic-Suggestions for the next Meeting will be send by mail (subject-filter)

An Item gets created ist a SharePoint List

the suggested topic will be send via mail and Options to some other people evaluate the relevance

 

Do you have any hints?

 

i found the operations specification but don't know how to use it.

https://docs.microsoft.com/de-de/rest/api/logic/definition-language#parameters

 

regards

Lukas

 

 

 flow.JPGspec.JPG

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Lukas
Level: Powered On

Re: Update a SharePoint Item and increas a value

Thank you so much for your input.

 

i didn't know this actions. For that this was a very interesting hint.

I think it would be a good way to add a value - but i recognized that in my useCase there is a logical error.

 

If i send the (5 flows) Options-Email triggerd by a new Item in SharePoint and i want to update this item it will not work, because each recipient of the Options-Email runs in a own Flow - with the Item-Instance which was created on "Item Created". The value of the Filed "yes" is null for this Item-Instance and all recipients in all flows. the started flows don't minde if someone changes the value "yes" - (I think Flow is keeping all Information (also the created Item) in the Flow as it starts)

 

Solution is a workaround with a new List - like

Topic, yes, no, maybe

And a group by view (even if there are some problems with it at the moment https://support.microsoft.com/en-us/help/2795623)

 

 

 

9 REPLIES 9
Community Support Team
Community Support Team

Re: Update a SharePoint Item and increas a value

Hi @Lukas,

 

Could you please explain a bit for the results of the item:

yes:3

no:1

maybe:1

Is this data stored under SharePoint list?

Would you please give an example (or data sample) regarding your SharePoint list?

For the Approval status, I could only think out the following way:

use of the Nested Approval Email to count the number approved.

The Structure should be the following:

54.PNG

When finished with the Last send Approval Email, following the Yes an No condition to count the number, then use the SharePoint ->Update Item action to update the corresponding status column.

Workflow Definition Language would work with Microsoft Flow, but the result from the Send Approval Email can't be counted, if the recipients have been added together within only one Send Approval Email Action.

Hope the information above is helpful.

And if I have any misunderstadnings, please let me know.

Regards

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Lukas
Level: Powered On

Re: Update a SharePoint Item and increas a value

case.JPG

Thank you for the Feedback.

 

If i reduce my question to the max (ignore the Mail-stuff...) it would be

 

How can i use "SharePoint Update Item" to increase an integer Value in a SharePoint List item.

I have the right item in the update action and now i would like to

e.g. Column "count" 

befor flow "Count=2"

in the flow "Count=Count+1"

after flow "Count=3"

 

 

 

Community Support Team
Community Support Team

Re: Update a SharePoint Item and increas a value

Hi @Lukas,

 

 

Good shots by using the Switch!

I will try to test with the Add function and share the results once I finished testing.

Regards

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

Re: Update a SharePoint Item and increas a value

Hi @Lukas

 

I thought that switch was the best option and so I created a similar flow but I tried to insert the add funcion but it is impossible to save the flow because it returns an error; for example, I tried with 

 

  • add("@parameters('YesField')",1)

where YesField is a SharePoint field where I store the Yes values, but it is impossible to save.

I also tried with "output", inspired by post like https://powerusers.microsoft.com/t5/Flow-Forum/Math-function-to-sum-or-multiply-values/m-p/8691#M211... , but have no luck.

 

Maybe is possible with the use of outputs to make the sum, @v-micsh-msft is more skilled to do this, maybe this is an idea to try.

 

 

--

Regards,

 

Marco Mangiante

Community Support Team
Community Support Team

Re: Update a SharePoint Item and increas a value

Hi @Lukas,

If only for the Add function, then please check the following screenshot:

CountYes column under SharePoint should be in number type.

68.PNG

 

Use the Compose outputs under CountYes.

I thought if we specify multiple users with the send Approval Email, it would trigger the different results, which actually not. The flow never runs for a second response.

That is to say, once there is an response made by any of the Approval Email receivers, this flow would be triggered and be triggered only one time.

So if you would like to have multiple response, we need first to get the Email list, then Add an apply to each before the Send Approval Email Action.

Updated: It seems that Send Approval Email Acrion can't be used within the Apply to each.

If this feature is needed, then please consider submit it as an idea under Microsoft Flow idea forum:

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

Regards

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Lukas
Level: Powered On

Re: Update a SharePoint Item and increas a value

Thank you so much for your input.

 

i didn't know this actions. For that this was a very interesting hint.

I think it would be a good way to add a value - but i recognized that in my useCase there is a logical error.

 

If i send the (5 flows) Options-Email triggerd by a new Item in SharePoint and i want to update this item it will not work, because each recipient of the Options-Email runs in a own Flow - with the Item-Instance which was created on "Item Created". The value of the Filed "yes" is null for this Item-Instance and all recipients in all flows. the started flows don't minde if someone changes the value "yes" - (I think Flow is keeping all Information (also the created Item) in the Flow as it starts)

 

Solution is a workaround with a new List - like

Topic, yes, no, maybe

And a group by view (even if there are some problems with it at the moment https://support.microsoft.com/en-us/help/2795623)

 

 

 

Lukas
Level: Powered On

Re: Update a SharePoint Item and increas a value

Thank you,

 

 yes  - i allready recognized that i have to use own email for each recipient.

 

But isn't "apply to each" running in a sequence?

So if i have 5 recipients, they get only mails if the previos recipient answers the option-mail?

 

if the first recipient do not answer, the other recipients never get a mail.

 

anyway - some interessting learnings from this Topic.

 

Thank you a lot.

 

regards

Lukas

 

 

Re: Update a SharePoint Item and increas a value

@v-micsh-msft I have been trying to use this for my Flow but I am getting an error. Here are screenshots of what I have:

2017-09-12_21-15-31.png

 

And then further down I have an Update Sharepoint Item with: 2017-09-12_21-16-34.png

 

 

The error I get is "Bad Gateway"

 

2017-09-12_21-22-35.png2017-09-12_21-22-50.png

 

EDIT: I was able to figure it out thanks to this article https://powerusers.microsoft.com/t5/Microsoft-Flow-Community-Blog/Update-a-secondary-SharePoint-list...

salikanwar
Level: Powered On

Re: Update a SharePoint Item and when list item is created or modified

Hi,

I only need the logic applied to get this working step by step.

My challange is how do set up Microsoft Flow that my flow should triger and update the existing list item (from one list to another list in sharepoint) or new item creation when item is created or modified.

 

Help will be much appreciated!

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

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

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 Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 180 members 4,994 guests
Please welcome our newest community members: