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

Use a calculated field from a previous screen to base visibility on

Hi all,

 

I have a single SharePoint list on which I'm basing my PowerApp form. 

I'm using 3 screens. 1st screen to test whether the item is applicable, the 2nd to check its level of risk, the 3rd to assess security. 

 

In my 3rd screen I want to base some of the questions on the overall risk calculation that was done on the previous screen. 

 

My overall level of risk is based on 2 main fields - simple example if(datacardvalue1.value="high" && datacardvalue2.value="high","high") In other words if both the fields are high then the overall risk is high, etc. 

 

I want to use the overall level of risk - which is based on the above formula - to base my visibility on the next screen. 

 

If Overall Risk is high answer all questions, if Overall Risk is Low then only answer q1. 

 

PS>I'm also noticing that the overall level of risk does not update in the sharepoint list even though it works fine in the form. (I can see it updates successfully on the form)

 

Hope I explained it all ok.

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Use a calculated field from a previous screen to base visibility on

@MadeleineDT 

Before moving to the next screen you should SET a variable to store the overall risk level.  Include this code in the OnSelect property of the button used to navigate to the next screen.

Set(
    overallRisk,
    DataCardValue1.Selected.Value="high" 
    && DataCardValue2.Selected.Value="high",
    "High",
    "Low"
)

 

If you only want a question to show on the next screen when overall risk is high put this code in the Visible property

overallRisk = "high"

 

Of if you want the question to show for multiple risk levels use this code instead.

ovrallRisk in ["medium", "high", "very high"]

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

1 REPLY 1
Super User
Super User

Re: Use a calculated field from a previous screen to base visibility on

@MadeleineDT 

Before moving to the next screen you should SET a variable to store the overall risk level.  Include this code in the OnSelect property of the button used to navigate to the next screen.

Set(
    overallRisk,
    DataCardValue1.Selected.Value="high" 
    && DataCardValue2.Selected.Value="high",
    "High",
    "Low"
)

 

If you only want a question to show on the next screen when overall risk is high put this code in the Visible property

overallRisk = "high"

 

Of if you want the question to show for multiple risk levels use this code instead.

ovrallRisk in ["medium", "high", "very high"]

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

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 (5,212)