cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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.

View solution in original post

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.

View solution in original post

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (6,382)