cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
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
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,817)