cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MadeleineDT Helper I
Helper I

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
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

‘Better Together’ T-Shirt Contest – Winner Announced!

‘Better Together’ T-Shirt Contest – Winner Announced!

And the winner is...

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Power Platform 2020 release wave 1 plan

Power Platform 2020 release wave 1 plan

Features releasing from April 2020 through September 2020

Top Solution Authors
Top Kudoed Authors
Users online (5,956)