cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Excel_aint
Level: Powered On

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
Excel_aint
Level: Powered On

Re: Powerapps OnStart If TextInput is empty ??

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 dinusc
Microsoft

Re: Powerapps OnStart If TextInput is empty ??

Hello @Excel_aint,

This is probably what you're looking for:

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

HadynM
Level 8

Re: Powerapps OnStart If TextInput is empty ??

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

 

Excel_aint
Level: Powered On

Re: Powerapps OnStart If TextInput is empty ??

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 Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

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