cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
atangella
New Member

How to redirect to a page based on a condition in Microsoft Power apps?

I am new to Powerapps portal. I have a situation where I need to redirect the user whenever a condition is false.

For example: I need to check whether every user is given consent, if YES then go to the page they need if NO, then redirect to the ~/consent page. For this, I have a flag in liquid code like {{ user.consent }}

I am not sure how can I do this. I tried adding this condition using JAVASCRIPT in the Header as it is global and used in the whole application. But, the redirect takes a longer time.

I wanna know if Microsoft offers any easy way to do this? I see there is a section in Powerapps Portal Management for Redirects.  Can I add a condition there? Like below image:

 

 

 

<img src="https://i.stack.imgur.com/0RQab.png" alt="img" />

 

 

 

1 REPLY 1
ragavanrajan
Super User
Super User

Hi @atangella 

 

Looks like you are capturing GDPR data. If so there is an inbuilt way for this.Have a look at the below threads 

 

https://powerusers.microsoft.com/t5/Power-Apps-Portals/How-to-set-terms-and-conditions-on-Sign-In-Re...  

 

https://powerusers.microsoft.com/t5/Power-Apps-Portals/GDPR-and-Terms-and-condition-page-is-showing-... 

 

Please let us know if this is helpful. 

 

Hope it helps. 
------------

If you like this post, give it a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users to find it. 

Helpful resources

Announcements
May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Carousel News & Announcements 768460.png

What's New in the Community?

Check out the latest News & Events in the community!

MPP IDEAS updated 768x460.png

Ideas

Discover ideas and concepts from users like you for how to use Power Pages and take your work to the next level.

Top Solution Authors
Users online (3,436)