cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
hilary_stoupa
Kudo Kingpin
Kudo Kingpin

OnStart - Am I doing something wrong?

I'm using the web version of the studio.

 

In OnStart, I want to create a variable with the User().Email as a value - I was hoping then I could use that in a filter for a data source instead of directly using User().Email, as that is apparently not delegable (based on the blue info dot and message).

 

But my variable doesn't seem to be set on start.

 

Function:

Set(CurrentUser, User().Email)


I put a label on the form with a value of CurrentUser, run the app, and the variable doesn't appear to have its value set.

 

I also tested using a Navigate function, but that also didn't appear to do anything - on start, I remained on the same screen.

 

Any ideas where I'm going wrong?

1 ACCEPTED SOLUTION

Accepted Solutions
Meneghino
Community Champion
Community Champion

Hi, I did the same and it worked for me. You need to reopen the app in ordert for the OnStart to be triggered.
I use the desktop Studio.
PS There is another very good reason to cache the user value in a varible, that otherwise the function gets called every time it is used and slows performnce.

View solution in original post

3 REPLIES 3
Meneghino
Community Champion
Community Champion

Hi, I did the same and it worked for me. You need to reopen the app in ordert for the OnStart to be triggered.
I use the desktop Studio.
PS There is another very good reason to cache the user value in a varible, that otherwise the function gets called every time it is used and slows performnce.

View solution in original post

Thank you - the trick was to reopen the app, which I hadn't realized. 

Hi, I had been trying to accomplish this in 2020; but as long I am on the studio works but when I preview or publish the app, it doesn't load any information became a big blank space. Any idea?

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 (61,130)