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.
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.