cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Emac44
Frequent Visitor

Expression on the OnStart module return blank()

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

 

Capture46.PNG

4 REPLIES 4
C-Papa
Super User
Super User

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

Emac44
Frequent Visitor

The issue persist 😫

C-Papa
Super User
Super User

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.

 
App.StartScreen: a new declarative alternative to Navigate in App.OnStart | Microsoft Power Apps

Emac44
Frequent Visitor

The above did not work.

 

I have to rollback to where the script worked correctly previously.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

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