cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Super User III
Super User III

Re: OnStart part of my app will not set variable values.

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.

Highlighted
Helper III
Helper III

Re: OnStart part of my app will not set variable values.

AaronTheYoung_0-1597840934560.png

 

Highlighted
Super User III
Super User III

Re: OnStart part of my app will not set variable values.

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (6,943)