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

If statement with a Navigate(Thisitem Issue

 

 

Hi all, first post, just getting to grips with PowerApps.

 

I have a Gallery that i am using as a list of 'Links', some of the links are web URLs and therefore use the Launch function and some are Screens therefore need the Navigate function, I have connected to a SQL table see below and the field name is URL.

 

Capture1.PNG

 

I expected this to just work out the box, but doesnt seem that way. the code below is OnSelect on the NextArrow Icons shown below.

Capture2.PNG

 

Capture3.PNG

Thanks in Advance

Simon

 

3 REPLIES 3
Responsive Resident
Responsive Resident

Hi, Just check what value are you getting in Thisitem.URL (may be some encrypted values) also in Launch once try hardcoded url and check if its working e.g. Launch(https://www.google.com).

 

This may give you better direction. Please let me know if you have any further questions/doubts.

 

If this answer helps please mark it as verified.

 

Regards,

Pavan Kumar Garlapati

Hi, sorry if I wasnt clear.

 

The Launch is working fine, it picks the correct URL from the table and it opens fine, however this only works when I hardcode the Screename in the Navigate section (as the statement isnt accepted as correct when read from table) as below, what I have done is included the Screename in the table in the URL field

 

If("http" in ThisItem.URL, Launch(ThisItem.URL), Navigate(StaffSuggestion,ScreenTransition.Fade))

 

Regardless of the IF statement the function Navigate(ThisItem.URL,ScreenTransition.Fade) doesnt appear to work.

 

Responsive Resident
Responsive Resident

Hi,

 

I assume you have between 5 - 10 screens to navigate. Unfortunately Navigate function expects screen type of parameter. so in your case you can write within your if function.

 

Switch( ThisItem.URL, "Screen1",Navigate(Screen1, Fade), "Screen2",Navigate(Screen2, Fade), "Screen3",Navigate(Screen3, Fade), "Screen4",Navigate(Screen4, Fade) ).

 

 

Mark it as verified if it answers your question.

 

Regards,

Pavan Kumar Garlapati

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (33,180)