I have a problem which i thought was going to be simple to fix at first but after a couple of attempts to gain the desired result I am still stumped. I am just trying to submit an item to a sharepoint list with a variable definition of the content type.
Currently I have a global variable which stores the content type dependant on a user selection on the previous page and it is stored like so.
Set(contenttype,{Id:"0x01000....", Name:"A"})I have then tried to collect some information from a form to send it to the list.
Collect(Audit,
{
'{ContentType}': contenttype,
System: DataCardValue27.Selected,
Date: Today(),
Title: DataCardValue18.Text,
Auditors: DataCardValue23.SelectedItems,
Attendees: DataCardValue24.SelectedItems
});I have also tried to set the content type as if it was a lookup column but this still didnt work.
Collect (Audit,
{
'{ContentType}':{'@odata.type' : "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",Id:contenttype.Id, Name:contenttype.Name}
....
})(It works fine with the default content type if i delete the content type line)
I have also tried to set a default property of the content type data card to the variable but this returns an error "A value must be provided for item".
Is this possible or should I post this request to the powerapps ideas?
Edit: I have been playing about with a control that I have linked to the '{ContentType}' column and i have locally collected what the selected control submits and the value I have been trying to patch to the list and they are both identical. I have also tried setting the default of this control (as you would for a lookup column) but it will be ignored so i am going to assume that this is a limitation.