Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Default User() not updating on datacard during form submission

(0) ShareShare
ReportReport
Posted on by 697

Ok, I am embarassed that I can't figure this out on my own but here we are. I've been at this for 2 hours and can't figure it out.

This should be really easy. It's just a datacard on a form and I want to default a selection. The datacard is hidden so users can't modify what's being saved but other than that, it's basic functionality.

Let me describe the use case.

 

I want to default a RequestedBy field. I don't want to use the default CreatedBy field that exists in every SP list because my use case requires the ability to modify the RequestedBy in certain conditions.

 

I have a datacard connected to the field that will be hidden when the form is in New mode.

Datacard.Default = ThisItem.'Requested by' (I actually have a varItem global that I should be using but I'm going to leave it with the gallery selection until I make this work.)

Datacard.Update = DataCardValue8.Selected

DataCardValue8.Items = Choices([@'SPIFF - Requests'].HiringManager) (Ignore the disconnect in the names. This is a result of copying a SP list and I've vowed to never do it again.)

DataCardValue8.Default = NULL

DataCardValue8.DefaultSelectedItems = User() (I'm about 99% sure this setting is my problem but don't know how to fix it. )

 

I can figure out how to allow editing when the form is in Edit mode after I get it to save the current User() into the right field on creation.

 

Thanks for the assist in advance.

Categories:
  • Verified answer
    DCHammer Profile Picture
    DCHammer 697 on at
    Re: Default User() not updating on datacard during form submission

    Would be handy if there was a delete Post function. I actually asked this same question a week ago and answered it myself. 

    If you're setting a Default on a User select dropdown or combobox, you have to do this funky 

     

    {Claims: Concatenate(
     "i:0#.f|membership|",
     User().Email// Person email
     ),
     Department: "",
     DisplayName: User().FullName,
     Email: User().Email,
     // Person email
    JobTitle: "",
     Picture: ""}

    Claims thing. Instead of simply putting User() into the Default property for the dropdown or combobox, you have to use the above.  

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,691

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 65,019

Leaderboard