Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

Using User() as a default value in a form

(0) ShareShare
ReportReport
Posted on by 147

I know there are threads on this issue, but it doesn't seem to work for me, so my issue is as follows:

 

When I make an edit form, I want the user to be selected by default in one of the drop-down menus. I expect entering User() in the the Default-property of either the Datacard or the DataCardValue, but neither helps. This seems to have worked for others however.

 

I also tried some of the more elaborate codes, but yet no result. I don't get an error either, there is just nothing showing up. I know I can retrieve the information, as I am using information from it on fields such as labels.

 

Does anyone know what's going on here?

Categories:
  • madlad Profile Picture
    madlad 2,637 on at
    Re: Using User() as a default value in a form

    What are the items of the dropdown?

    If the item you're trying to specify as the default doesn't appear in the dropdown's items, it will be blank.

    Make sure that the items for the gallery are both of the person type, and also that the user in question would be in these.

  • Daniël Profile Picture
    Daniël 147 on at
    Re: Using User() as a default value in a form

    Hi Alaa, thank you for your reply. However, it doesn't seem to change anything:

    Danil_0-1691571306700.png

    No error, just an empty field. Do you have any idea why that would be?

  • alaabitar Profile Picture
    alaabitar 1,503 on at
    Re: Using User() as a default value in a form

    Hello @Daniël 

    In that case as a workaroung you can do in the defaultselecteditems property of your dropdown something like

    LookUp(Choices([@YOUR_SHAREPOINT_LIST_NAME].NAME_OF_YOUR_COLUMN),User().Email = Email)

    This should do the trick.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,666

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,996

Leaderboard