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.

Anonymous
Not applicable

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
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 (4,837)