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

Powerapps OnStart If TextInput is empty ??

Screen1 contains TextInput1. I would like to put an if statement in the Screen1 OnStart field.

If Textinput1 is blank, do nothing, else go to screen2

Thanks a Lot.

E

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Frequent Visitor

Thanks for your replies.

I ended up adding a third screen, & added 2 hidden buttons to screen1.

Screen1 Onvisible  If(Not(IsBlank(TextInput_EmaData)), Select(btnProceed),Select(btnIsBlank)))

btnProceed OnSelect Navigate(Screen3,Fade)

btnIsBlank OnSelect Navigate(Screen2,Fade)

TextInput_EmaData is on Screen2

 

View solution in original post

3 REPLIES 3
Microsoft
Microsoft

Hello @Excel_aint,

This is probably what you're looking for:

If(!IsBlank(TextInput1),Navigate(Screen2,ScreenTransition.Cover))

Responsive Resident
Responsive Resident

Hi @Excel_aint

I do something similar where I have a loading screen that preloads data.

My preferred method is to use the Screen1.Visible and evaluate a toggle control on another screen. 

UpdateContext({loadedApp: false});
"... Do lots of data stuff here...";
If(tglAutoload.Value=true, Select(btnProceed),UpdateContext({loadedApp: true}))

Add a button to Screen1 (btnProceed in my case) that visible = loadedApp and set the OnSelect to the Navigate statement.

Navigate(scnNextScreen,ScreenTransition.None)

This gets around the 'you can't navigate away from the current screen because otherwise you'll never see it' error.

This thread explains why to use OnVisible instead of OnStart.

https://powerusers.microsoft.com/t5/General-Discussion/Why-we-can-not-use-Navigate-in-OnVisible/td-p...

Hope that helps.

Hadyn

 

Frequent Visitor

Thanks for your replies.

I ended up adding a third screen, & added 2 hidden buttons to screen1.

Screen1 Onvisible  If(Not(IsBlank(TextInput_EmaData)), Select(btnProceed),Select(btnIsBlank)))

btnProceed OnSelect Navigate(Screen3,Fade)

btnIsBlank OnSelect Navigate(Screen2,Fade)

TextInput_EmaData is on Screen2

 

View solution in original post

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 (31,726)