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

Navigation on condition

Hi,

 

I've got a problem with my submit button that I cannot figure out.

 

Case:

I have 5 screens in my app:

  • Screen 1 (Form 1/3)
  • Screen 2 (Form 2/3)
  • Screen 3 (Form 3/3)
  • X (another form)
  • Thank you screen

 

Screens 1-3 are linked to a SharePoint List.

 

I used to have the following ONSELECT formula on the SUBMIT button on Screen 3:

 

If(IsBlank(DataCardValue_3_5), Notify("Please fill in the required fields", Error), Navigate(X)); Patch('SP List', Defaults('SP List'), Screen1_form.Updates, Screen2_form.Updates, Screen3_form.Updates)

 

This would work perfectly and would bring me from Screen 3 to Screen X while submitting all the fields in the Sharepoint List (except, it would give me an error when DataCardValue_3_5 wouldn't be filled).

 

However, a new request was raised that I should only navigate to Screen X when the value (choice) of DataCardValue_2_5 would be choice A. If not choice A, navigation should be directly to the Thank You screen. I tried different things but cannot figure out the right formula. This is my end result (which doesn't work):

 

IF(IsBlank(DataCardValue_3_5), Notify("Please fill in the required fields", Error), IF("A"=DataCardValue_2_5.SelectedItems.Value, Navigate(X), Navigate(ThankYou))); Patch('SP List', Defaults('SP List'), Screen1_form.Updates, Screen2_form.Updates, Screen3_form.Updates)

 

Is there anyone with an answer my problem?

 

Thanks a lot in advance 🙂

 

Cheers!

1 ACCEPTED SOLUTION

Accepted Solutions
JR-BejeweledOne
Super User
Super User

Try this:

 

If(
    IsBlank(DataCardValue_3_5), Notify("Please fill in the required fields", Error), 
    "A" = DataCardValue_2_5.SelectedItems.Value, Navigate(X)),
    Navigate(ThankYou); Patch('SP List', Defaults('SP      List'), Screen1_form.Updates, Screen2_form.Updates, Screen3_form.Updates,

    
   )


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

View solution in original post

1 REPLY 1
JR-BejeweledOne
Super User
Super User

Try this:

 

If(
    IsBlank(DataCardValue_3_5), Notify("Please fill in the required fields", Error), 
    "A" = DataCardValue_2_5.SelectedItems.Value, Navigate(X)),
    Navigate(ThankYou); Patch('SP List', Defaults('SP      List'), Screen1_form.Updates, Screen2_form.Updates, Screen3_form.Updates,

    
   )


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

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

secondImage

Demo Extravaganza Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,362)