cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Post Prodigy
Post Prodigy

Calculations between sharepoint lists?

Hi

I have 2 sharepoint lists.

One list to store name and total account value (list1)

One list to store name and amount of money to add to the persons account. (list2)

 

I have a relationship between list 1 and list 2.

So that i can in powerapps see all rows in list 2 that are related to one row in list 1.

This works geat.

 

But now to my problem... i cant figure out how to make the calculations.

How to update the list1 value of account total from the input of a new row in list2.

 

Something like:

input in list2 value 10 then add 10 to list1 account total on the row that is related to current list2 row.

 

In the future ill need to build also a extract thing, input how much to withdraw from the account total.

 

4 REPLIES 4
Community Support
Community Support

Hi @Oskarkuus 

 

Could you please share more details of your two lists? 

What are the column type of these two lists's columns? Lookup or single line?

You want to save caculations into the list, you can use patch and sum function to achieve that.

More information:

function-patch

function-aggregates

 

Best Regards.

Yumia

Advocate III
Advocate III

Did you try using variables? Store one value in var1 and another value in var2, then use them wherever you like in your form(s).

Yes thats it. But how to create a variable of current value in a textinput field?

And how to ad that value in another to add to another value and then save the result in a form?

On form1, select a text input field, and set OnChange=Set(varValue1,TextInputCardName)
Do the same on form2:
OnChange=Set(varValue2,TextInputCardName2)

Add a new label to where your want to display the total set:
Text=varValue1+varValue2
or you can set a new variable:
Set(varTotal,varValue1+varValue2) and then use varTotal wherever you like, i.e.,:
Text=varTotal
You can only calculate numbers. If a variable is a a string, i.e., from a text field, you can convert string to number like this:
Value(varValue1)

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (49,934)