cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

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
Highlighted
Super User III
Super User III

@Anonymous 

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
Highlighted
Super User III
Super User III

@Anonymous 

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (8,749)