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

What's wrong with this?

Below "code" is in the OnSuccess field of a form. Trying to display a diff screen based on the value of text field "Approved".

 

If(ThisItem.Approved="No", Navigate(Thank_you_screen,ScreenTransition.Fade), Navigate(Thank_you_screen_update,ScreenTransition.Fade))

 

Apps is not liking "ThisItem.Approved".  Tooltip says "Invalid use of ."

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

@Xv 

So, the remaining question is - "what type of column is Approved?, but I can see that you have added a screenshot and some more information in your original post and it appears that you are using a form.

So, if that is the case, then your formula needs to be the following:

If(
   yourFormName.LastSubmit.Approved="No", 
      Navigate(Thank_you_screen,ScreenTransition.Fade), 
      Navigate(Thank_you_screen_update,ScreenTransition.Fade)
)

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

6 REPLIES 6
Super User III
Super User III

@Xv 

To start with - you have not provided any context to this formula. 

Where is this formula?  Is it in a Gallery or Form?  What is the Items property of the Gallery or Form?  

What kind of column is Approved in your DataSource?

All that info will assist greatly.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!
Frequent Visitor

Right - I was adding the info as you replied.

Super User III
Super User III

@Xv 

So, the remaining question is - "what type of column is Approved?, but I can see that you have added a screenshot and some more information in your original post and it appears that you are using a form.

So, if that is the case, then your formula needs to be the following:

If(
   yourFormName.LastSubmit.Approved="No", 
      Navigate(Thank_you_screen,ScreenTransition.Fade), 
      Navigate(Thank_you_screen_update,ScreenTransition.Fade)
)

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

Frequent Visitor

Thank you. Where can I find documentation on this?
I did specify that the field is type Text. 

 

Super User III
Super User III

@Xv 

If it is text, then yes, that formula should work fine now.

You can learn more about EditForms from the documentation.  Or, you can watch my comprehensive video on EditForms (and how to go way outside of the box with forms).  It's a long one, but it will answer most every question you have on them.  And there is a table of contents in the description of the video, so you can jump to certain reference points as needed.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!
Frequent Visitor

Thanks again - I will check these out.

 

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (11,461)