web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Multiple actions in ne...
Power Apps
Answered

Multiple actions in nested IF statements

(0) ShareShare
ReportReport
Posted on by 19

Hello.  I am a new (and non-technical) user and could use help. 

 

On the first page of my app, I have a form (MainForm) where most of the fields are required.  I have nested IF statements on the "next" button instructing PowerApps to navigate to screen FailureScreen if any of the required fields are blank/empty.  If all required fields are not blank, then I want PowerApps to submit the form to my SP List AND I want to navigate to the next screen (profile pic) in my app.

 

This is what I have right now for the "Next" button OnSelect property:

If(IsBlank(FirstName),Navigate(FailureScreen),
If(IsBlank(LastName), Navigate (FailureScreen),
If(IsBlank(DisplayName), Navigate (FailureScreen),
If(IsBlank(HomeAddress), Navigate (FailureScreen),
If(IsBlank(MobileNumber), Navigate (FailureScreen),
If(IsBlank(EmailAddress), Navigate (FailureScreen),
If(IsBlank(StartDate), Navigate (FailureScreen),
If(IsBlank(EmployeeType), Navigate(FailureScreen),
If(IsBlank(OfficeLocation), Navigate(FailureScreen),
If(IsBlank(ManagerName), Navigate (FailureScreen),
If(IsBlank(Birthdate), Navigate (FailureScreen),
If(IsBlank(Technology), Navigate (FailureScreen),SubmitForm(MainForm))))))))))))) ;
Navigate('profile pic')

 

PowerApps is correctly writing to my SP List when all fields are full, but it always navigates to ProfilePic screen even if a field is left blank because it's the last command and not conditional.

 

How can I navigate to screen ProfilePic after the form is submitted AND only if all required fields are not empty?  Thanks for your help.

Categories:
  • TheRobRush Profile Picture
    11,128 Moderator on at

    Try this

    If(
     Or(
     IsBlank(FirstName),
     IsBlank(LastName),
     IsBlank(DisplayName), 
     IsBlank(HomeAddress),
     IsBlank(MobileNumber),
     IsBlank(EmailAddress),
     IsBlank(StartDate), 
     IsBlank(EmployeeType), 
     IsBlank(OfficeLocation), 
     IsBlank(ManagerName), 
     IsBlank(Birthdate), 
     IsBlank(Technology)
     ), 
     Navigate (FailureScreen),
     SubmitForm(MainForm);
     Navigate('profile pic')
     )

     

    Though long term I would recommend changing up colors/ italics, or having small messages below/to side of input areas that are required that disappear once the requirements for that control have been met and setting your buttons display mode to DisplayMode.Disabled until all requirements are met, and only swithc to displaymode.edit when all are good to go. Less confusing then jumping around screens GUI UX wise I think

  • Verified answer
    WarrenBelz Profile Picture
    156,774 Most Valuable Professional on at

    Hi @nstoney ,

    Put this on your button

    If(
     IsBlank(FirstName) || IsBlank(LastName) || IsBlank(DisplayName) || IsBlank(HomeAddress) ||
     IsBlank(MobileNumber) || IsBlank(EmailAddress) || IsBlank(StartDate) || IsBlank(EmployeeType) ||
     IsBlank(ManagerName) || IsBlank(Birthdate) || IsBlank(Technology), 
     Navigate (FailureScreen),
     SubmitForm(MainForm)
    )

    and this on the OnSuccess of the Form

    Navigate('profile pic')

     

    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.

    Visit my blog Practical Power Apps

     

  • TheRobRush Profile Picture
    11,128 Moderator on at

    Oh for sure, that navigate placement is much better, good catch @WarrenBelz 

  • nstoney Profile Picture
    19 on at

    Thank you to all from this newbie!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 337 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 250

#3
Mohsin Ali Profile Picture

Mohsin Ali 225

Last 30 days Overall leaderboard