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 Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,133)