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
Super User

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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (3,605)