Showing results for 
Search instead for 
Did you mean: 
Advocate I
Advocate I

Do a simple add expression to update an item

I need to add an item value from one SharePoint Online list to another but can't figure out how to do this since I'm unfamiliar with Expressions and have not been able to hunt down an example.


I want to Add List B number to List A number.  I'm assuming I have to use the expression add(Sumand_1:number, Sumand_2:number) in the List A field.  Is this correct?  If so what does it look like?  Is it  add(Sumand_1:List A number, Sumand_2:List B number)?


Also is there a site that provides examples of expressions?




Helper I
Helper I

Is this the doc you are looking for?


There's a basic example provided.



Hi jannaj:


I'm trying to do a Flow that mimics a Sharepoint Designer workflow.  In Sharepoint Designer, you would set a variable to the value of the item in list B and then add that variable to value on the item in List A. Pretty simple once you set your conditions up.  The reason I'm not using a Workflow is because it is has not work consistently with SharePoint on line.  So I wanted to give it a try with a Flow.


The lack of documentation surronding parts of Flow is surprising.  Expressions is a good example.  "Power Users" are not going to use this capability when the documentation is geared towards Azure.

Helper I
Helper I

Joe - Flow for sure has a ways to go in terms of stability and documentation. Sorry the link didn't help. Best of luck to you - maybe someone else has some ideas?


- Janna

Super User
Super User

@Black7830- Here is an example that may help you.


I have a SharePoint list with a number column.  When an item in the list is created or changed, my Flow runs.

I initialize a variable and set it to the value stored in a column called NumberCol and add 10 using the Add expression.


In your case, you'll need to retrieve a row from List 2 and reference the value of a second number column in the expression.  You will likely be put into a loop but this shouln't be an issue as you should only be retrieving one row.


I then update a SharePoint columns by setting it equal to the variable.




If this does not work for you, please provide additional details and I will enhance my example.


If this does solve your issue, please mark your post as solved.





If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.


Hi Scott: Appreciate the assistance.  But where does Initialize Variable come from?  It is not a SharePoint Flow Action, Trigger or Expression.



Joe - it is an Action. And you have to initialize the variable before you can use it/set it.2018-07-09_15-35-17.gif

Thanks. Now I see it. I will give it a try.



Hello,  @Black7830!

Have you had an opportunity to apply @jannaj‘s recommendation to adapt your Flow? If yes, and you find that solution to be satisfactory, please go ahead and click “Accept as Solution” so that this thread will be marked for other users to easily identify!

Thank you for being an active member of the Flow Community!

Flow Community Manager

- Gabriel
Community Manager
Power Automate | Power Virtual Agents
Super User Program Manager

did you get this working?  I'm doing simple action compose with add expression and cant get syntax right.  I get item to pickup a number and simply want to add 1 to it.  Have tried several things add([credit # sequential],1) and add('credit # sequential,1).  Nothing works. 


When you say it doesn't work, does it generate an error?  If so, what error?

Also, a screen shot of your expression would be very helpful.



If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.


My flow starts when 'credit request' entered.  I then get item 'credit number' sharepoint list which just had the last number in a doc. I then want to add to that field and update it in the credit number list and the credit request.  My issue is the add function.  I've tried add('Credit # increment',1) and says its a string.  I've tried add([credit # increment],1) and it says invalid syntax.  Tried below syntax also.  I just cant seem to get syntax right for the add expression.  thanks in advance





Try converting the Credit # to a number before adding anything to it by using either the int() or float() expression.



If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.


Helpful resources

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,125)