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
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (2,365)