Hi everyone,
Hoping to get some help on a Lookup formula. It works for me as the creator of the App, but not for anyone else.
I have a horizontal gallery that displays a range of employee data (name, email, department etc.) What I want to happen, is that when a user opens the app their record is the first to display, then they can search or scroll to see the other employees. But if their details aren't already in the data source, I want the gallery to just default display. So on the default property of my gallery, I have:
If(
IsBlank(
LookUp(
Employee_Data,
Email = User().Email
)
),
First(Self.AllItems),
LookUp(
Employee_Data,
Email = User().Email
)
)
Another peculiarity I've noticed, is that I cannot set a variable to reliably return user data. Using the OnStart property of the App I've tried "Set(varCurrentUser, User())" but setting the text in a label on my gallery screen to "varCurrentUser.Email" gives me a blank label, and CurrentUser.Email = blank in the formula bar. Same story if I try to use the Office365Users connector to achieve the same outcome.
I'm stumped! Any help is greatly appreciated.
Audrey
Solved! Go to Solution.
Hi @A_MacMac :
About the formula:
I suggest you replace 'self.Allitems' with the value in the items property of this gallery
About the OnStart property:
In edit mode, OnStart will not be executed automatically, you need to trigger this event manually
Best Regards,
Bof
Hi @A_MacMac ,
In order to assign the Current User in a variable, please use the "OnStart" in App as shown below, and then you will be able to use the variable in forms.
Using the variable in form:
Please click the button Accept as Solution and give thumbs up, if it is helpful for you.
Hi @A_MacMac :
About the formula:
I suggest you replace 'self.Allitems' with the value in the items property of this gallery
About the OnStart property:
In edit mode, OnStart will not be executed automatically, you need to trigger this event manually
Best Regards,
Bof
Hi @A_MacMac ,
In order to assign the Current User in a variable, please use the "OnStart" in App as shown below, and then you will be able to use the variable in forms.
Using the variable in form:
Please click the button Accept as Solution and give thumbs up, if it is helpful for you.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
190 | |
53 | |
51 | |
35 | |
33 |
User | Count |
---|---|
268 | |
92 | |
80 | |
68 | |
67 |