cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AaronTheYoung
Helper III
Helper III

OnStart part of my app will not set variable values.

It's been a frustrating week developing a very simple app.  I've actually been working on TWO simple apps.  In one app, my variables are setting up quite nicely.  A simple thing like:

 

Set(varUserEMail, User().Email);

 

....works fine in one app's OnStart section, but not in the other.

 

I also can't use varUserEmail as a variable to determine who is using the app and direct them to the appropriate screen based on access.  In the failing app, even resorting to using User().Email is failing to direct the user to the right screen since it doesn't evalute.

I have opened up a ticket with Microsoft as this doesn't seem to be a syntax issue and after reviewing my code, agreed it wasn't a syntax issue.  They then advised me to start OVER because they couldn't figure it out.

 

Even moving the variable setting out of the OnStart section yields no success.

 

Good app:

 

Set(varUserEmail, User().Email)

If(varUserEmail="user1@mailstop.com" Or VarUserEmail="admin@mailstop.com", Navigate(Admin_Screen, Transition.None);

 

Bad app:

Neither this:

If(User().Email="user1@mailstop.com" Or User().Email="admin@mailstop.com", Navigate(CheckIN_AdminScreen, Transition.None);

 

NOR THIS:

 

Set(varUserEmail, User().Email)

If(varUserEmail="user1@mailstop.com" Or VarUserEmail="admin@mailstop.com", Navigate(CheckIN_AdminScreen, Transition.None);

 

...will work in the bad app.

 

Help!  I need to get this simple app done.

3 REPLIES 3
eka24
Super User III
Super User III

Take a screenshot of where you put the formula

------------

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

AaronTheYoung_0-1597840934560.png

 

I think your last formula should be closed with )

------------

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

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 (29,799)