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

Setting field name based on other calculation on SharePoint as Data source PowerApp

I have 5 dropdowns and each has string value assigned, but when coming to a calculation I use corresponding integer value to calculate. For example, the calculation is done on a label to test it is correct,

If(DataCardValue26.Selected.Value="Unlikely",1,DataCardValue26.Selected.Value="Possible",2,DataCardValue26.Selected.Value="Probable",3,DataCardValue26.Selected.Value="Almost Certain",4,false)

Then I have a other label to calculate these 5 dropdown bansed on the integer value like below:

Max(AvailabilityScore,InternalScore,ConfidentialityScore)*ImpactScore+Likelihood

How can I set the Label result on below attached image and the result shows 2 to the Score's datacard value? 

Currently it set it as "Parent.Default", I tried to use formula there "Max(AvailabilityScore,InternalScore,ConfidentialityScore)*ImpactScore+Likelihood" it gave me error I tried "If(SharePointForm1_1.Mode=New,Max(AvailabilityScore,InternalScore,ConfidentialityScore)*ImpactScore+Likelihood, Parent.Default)" it gives different error, The data is saving to SharePoint list.

How can I achieve this please, is there anyway combine all formula to Score? so I can remove the labels ?

 

Many thanks for your help

 

1 ACCEPTED SOLUTION

Accepted Solutions
erkindunya
Level: Powered On

Re: Setting field name based on other calculation on SharePoint as Data source PowerApp

Yes seems to I am going to answer my own question: the solution is adding the set(ScoreResult,Max(AvailabilityScore,InternalScore,ConfidentialityScore)*ImpactScore+Likelihood to DropDown> onchange if you have two DataCard then use like this

set(ScoreResult,Max(AvailabilityScore,InternalScore)*ImpactScore; set(ScoreResultNewDD,Max(AvailabilityScore,InternalScore,ConfidentialityScore)*ImpactScore+Likelihood on all your dropdown so you dont need click on button to trigger calulation manully, I will working to improve the formula by removed all temp label and store them to dropdown.

View solution in original post

4 REPLIES 4
erkindunya
Level: Powered On

Re: Setting field name based on other calculation on SharePoint as Data source PowerApp

Now I can calculate it when a button is pressed, like below Button > OnSelect "set(ScoreResult,Max(AvailabilityScore,InternalScore,ConfidentialityScore)*ImpactScore+Likelihood" and set Score Datacard to consume the Variable on Defalt > ScoreResult .

Is there any way to can be calculated without pressing the button, it just changes based on dropdown value change on any of 5 dropdown list.

Thank

erkindunya
Level: Powered On

Re: Setting field name based on other calculation on SharePoint as Data source PowerApp

Yes seems to I am going to answer my own question: the solution is adding the set(ScoreResult,Max(AvailabilityScore,InternalScore,ConfidentialityScore)*ImpactScore+Likelihood to DropDown> onchange if you have two DataCard then use like this

set(ScoreResult,Max(AvailabilityScore,InternalScore)*ImpactScore; set(ScoreResultNewDD,Max(AvailabilityScore,InternalScore,ConfidentialityScore)*ImpactScore+Likelihood on all your dropdown so you dont need click on button to trigger calulation manully, I will working to improve the formula by removed all temp label and store them to dropdown.

View solution in original post

Community Support Team
Community Support Team

Re: Setting field name based on other calculation on SharePoint as Data source PowerApp

Hi @erkindunya ,

Have you solved your problem?

 

If you have solved your problem, please consider go ahead to click "Accept as Solution" to identify this thread has been solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
erkindunya
Level: Powered On

Re: Setting field name based on other calculation on SharePoint as Data source PowerApp

@v-xida-msft  Yes I did, just need to improve the formula for best performance.

Thanks

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (4,480)