cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Roberto_el_Hajj
Super User
Super User

How to get a field value based on the current user?

Hello,

 

I hope all is well,

 

Problem:

I want to get a field value of the column called "EmloyeeN" from a table called "leave request" of the current user where the "EmployeeNO" field type is lookup on the table "Employees" in order to place the result in a dropdown Datacard automatically on login (the Datacard DisplayMode will be view only)

 

What I used:

With(
    {
        _EmplID: LookUp(
            Employees,
           currentUserEmail = 'E-Mail'
        ).No
    },

Filter(
        'Leave Requests',
        Employee.No = _EmplID 
)
)

 

When I used this expression, an "expected a record value" error pops up.

 

So what is the best practice to solve my issue ?

 

Thanks

1 REPLY 1
v-jefferni
Community Support
Community Support

Hi @Roberto_el_Hajj ,

 

Did you put the formula in Default property of the Dropdown? If it is a Combo box, you need to set it in DefaultSelectedItems property as Default property only accepts single record while Filter function will return a table.

 

What exactly would you like to display in the Dropdown? There should be multiple records belong to a specific user in the Leave request table, unless you will only need to show the latest request of the user?

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,173)