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

If form is blank navigate to different screen

Hope all is well with you and yours.

 

I am trying to accomplish the following:

Screen1 form with an individuals data to be updated, the "next" button takes you to another form where if there is existing data it will appear if not it shows "No item to display".  What I want to happen is if it results in "No item to display" to navigate to another screen where a New entry can be made (not the same screen/form).  I have tried various formulas within the ONSELECT on button, ONVISIBLE on Screen2 and ITEM on Screen2.

ONSELECT - allows the formula but does not navigate to NEW entry screen3

ONVISIBLE - does not allow navigation formula

ITEM- does not navigate from Screen2

I don't receive an error message on the formula itself, and still do not get the end result I want:

If(IsBlank(ReviewForm);Navigate(NewForm),Navigate(ReviewForm,ScreenTransition.UnCover))

 

Support would be great.

With Gratitude

Erika Esther

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @E2DataSolutions ,

That code (the Navigate part) will not work on a Form Item (and you will get the error you are seeing) as Item is simply looking for the data to display, and does not have a Navigate ability.

That code needs to be on a button or icon where you are choosing to navigate to the correct screen based on whether there is data in the target form.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

 

View solution in original post

11 REPLIES 11
WarrenBelz
Super User III
Super User III

Hi @E2DataSolutions ,

Rather than bother with going to the screen, why not do the same query as the Item property of the form on the screen and navigate to your other screen if this is blank (which is what No Item to Display is saying).

What is the Item property of the Form on the screen?

Hello @WarrenBelz 

All forms on all screens have the same ITEM formula, only on "No Item" form did I try to incorporate this with the If statement and it gave me an error message

 

Last(Filter('Table','Column'= Dropdown.SelectedText.Value))

 

 

Hi @E2DataSolutions ,

You do not need the Last in the formula if you are looking for a blank result

If(
   IsBlank(
      Lookup(
         'Table',
         'Column'= Dropdown.SelectedText.Value,
         'Column'
      )
   ),
   Navigate(YourOtherScreen),
   Navigate(YourFormScreen)
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Unfortunately I am not looking for a blank result, I want it to find the last entry and if there isn't one I'd like to make a new entry.

Thank you for the formula, this will support for other screens.

Hi @E2DataSolutions ,

I am a bit confused - if Last() is blank, then the whole query is blank - Last shows the last record and can be the first if there is only one record.

Hello @WarrenBelz 

 

I am having trouble with the formula you provided.  I am getting various error messages, especially with the Navigate function. It states: "Behavior function in a non behavior property. You can't use this property to change values elsewhere in the app"

 

 

HI @E2DataSolutions ,

Where have you put this formula?

Hello @WarrenBelz 

 

Within the resulting screen:

form/advanced/Data/ITEM 

Screen/advanced/onVisible - error message:  "Navigate cannot be used here since it will automatically always navigate from this screen"

Form/properties/OnSuccess & OnFailure - error message: "invalid argument type", also results in no change when in Play mode.

Hi @E2DataSolutions ,

That code (the Navigate part) will not work on a Form Item (and you will get the error you are seeing) as Item is simply looking for the data to display, and does not have a Navigate ability.

That code needs to be on a button or icon where you are choosing to navigate to the correct screen based on whether there is data in the target form.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

 

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

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

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (34,819)