I have a simple expression on the OnStart module not returning my email rather display error. It was working before and suddenly stopped. Same script works when I use it on a text control. I cant figure out what is wrong😥 please help
Hi, try Set(CurrentUser, User()) and then when you require the email use CurrentUser.Email. If this doesn't work make sure you haven't set CurrentUser anywhere else with a different value type.
In developer mode you need to select the App in the tree, press the three dots and press run on start to execute the code
Have a read of the below article, there are a few things you can try near the bottom.
This may be a solution ThisUser = LookUp( Users, Email = User().Email )
Also try to adding the Set() to the screen On Visible.
I have tested this in the UK and I can use both solutions without issue.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Join us for the next call on June 15, 2022 at 8am PDT.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.