cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

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
Highlighted
Community Champion
Community Champion

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
Highlighted
Community Champion
Community Champion

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

Highlighted
Frequent Visitor

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.

Highlighted
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
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,264)