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

If condition connected to previous screen

Good morning,

 

In the edit screen where you can modify a form, to show what need to be show in the form, we need to type under item: xxxGallery.Selected.

Now I would like to add an if condition to this. Something that we look like this.

if( previous screen was screen 1; Gallery1.Selected; Gallery2.Selected)

Is this possible with coding, or do I have to create on Screen1 a variable and if the variable is detected Gallery1.Selected is true, if not detected Gallery2.Selected is true.

1 ACCEPTED SOLUTION

Accepted Solutions
Meneghino
Level 10

Re: If condition connected to previous screen

Hi @Tahon_Mathieu

I don't think you can directly obtain the value of the previous screen in the same way that you can for the current screen using the App.ActiveScreen() function.

So I think you have to do what you are trying to do by using a global or a context variable.  Fortunately this is not difficult.

3 REPLIES 3
Meneghino
Level 10

Re: If condition connected to previous screen

Hi @Tahon_Mathieu

I don't think you can directly obtain the value of the previous screen in the same way that you can for the current screen using the App.ActiveScreen() function.

So I think you have to do what you are trying to do by using a global or a context variable.  Fortunately this is not difficult.

Tahon_Mathieu
Level: Powered On

Re: If condition connected to previous screen

No it is indeed not difficult, however, I need to add a lot of extra code, everywhere, and make sure everything works. That is why i wanted to know if there was a simple code to add after 'if' concerning what the previous screen was.

trainblazer
Level: Powered On

Re: If condition connected to previous screen

Hi @Meneghino ,

I am new to PowerApps, how do I identify the previous screen with a global or context variable?

Thanks,

 

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

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

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 251 members 4,723 guests
Please welcome our newest community members: