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

Calculating SUM of datacards prior to submitting to Sharepoint

I have 7 fields that must sum to a specific amount prior to submittal to SharePoint list. I have SP list handling the validation as well as returning them to the selection screen to adjust responses but was wondering if there was a way to calculate these columns and display on the Powerapp form as these amounts are selected from the dropdowns. I do have a total amount field in sharepoint but of course it doesnt sum until submitted. 

 

I was then wanting to not allow the "Submit" button be displayed unless the specified amount was achieved. Any ideas? I can not find anything on the subject.

 

Capture.JPG

1 ACCEPTED SOLUTION

Accepted Solutions
tchin-nin
Level 10

Re: Calculating SUM of datacards prior to submitting to Sharepoint

Sorry my bad, you'll have to use
DataCard Skye.Selected.Value

Théo
4 REPLIES 4
tchin-nin
Level 10

Re: Calculating SUM of datacards prior to submitting to Sharepoint

Hi @tonyarc,

So you have 7 fields containing an amount and you want the Submit button to be enabled only if the sum of the 7 fields is greater than a specified amount, is that right ? 

 

Your Amount input look like dropdownlist so I assume 7 dropdown named : Amount1, Amount2, ... Amount7. And I will fixe the specific amount to 1000 to enable the Submit button.

 

SubmitButton.DisplayMode :
if(Sum(Value(Amount1.value), Value(Amount2.value), Value(Amount3.value), Value(Amount4.value), Value(Amount5.value), Value(Amount6.value), Value(Amount7.value)) > 1000, DisplayMode.Edit, DisplayMode.Disabled)

Théo

tonyarc
Level: Powered On

Re: Calculating SUM of datacards prior to submitting to Sharepoint

Thanks Theo Here is what I have done: I set Display Mode of my Submit button to If(Sum(Value(DataCardValue38.value), Value(DataCardValue39.value), Value(DataCardValue40.value), Value(DataCardValue41.value), Value(DataCardValue42.value), Value(DataCardValue44.value), Value(DataCardValue1.value)) = 2000,DisplayMode.Edit,Disabled) Im getting "the function Value has some invalid arguments"
tchin-nin
Level 10

Re: Calculating SUM of datacards prior to submitting to Sharepoint

Sorry my bad, you'll have to use
DataCard Skye.Selected.Value

Théo
tonyarc
Level: Powered On

Re: Calculating SUM of datacards prior to submitting to Sharepoint

worked perfectly - thanks Theo!!

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, August 21st at 8am PDT

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

SixthImage

Power Summit Australia 2019

August 20-23rd 2019

Top Kudoed Authors
Users Online
Currently online: 257 members 3,942 guests
Please welcome our newest community members: