cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Oskarkuus
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
v-yuxima-msft
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

GrischkePro
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
User Groups Public Preview

Join us for our User Group Public Preview!

Power Apps User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.

Power Apps Community Call

Monthly Power Apps Community Call

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

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (37,041)