'How to get the correct record schema for sending a user through a Patch function in Powerapps

I am trying to use the Patch function in powerapps to send a user to a Sharepoint list.

I have tried to do something along the lines of including this in my Patch:

{  
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",  
DisplayName:User().FullName,
Email:User().Email
}

So for example I'll have

    Patch('Issue Tracker', Defaults('Issue Tracker'),{
        'Project Name':ProjectName,'Occurred at Timestamp': DateTimeValue(DateTimeString)- (14/24), 'Reported By':     {  
        '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",  
        DisplayName:User().FullName,
        Email:User().Email
        }
}

The error I get from this is that I am missing a column from my User record, I need a column called "Claim", and it is of type Text.

I can't find any reference to Claim in the intellisense of the User() function, nor can I find any reference to Claim in the Office365Users.MyProfile() function, so I can't just say "User().Claim" for this field (for example).

So if I add the claim column by just saying 'Claim: ""', and carrying on, I get an error for a missing column called "JobTitle" etc.

So that eventually my record looks like this:

{  
    '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",  
    DisplayName:User().FullName,
    Email:User().Email,
    Claims: "",
    Department: Office365Users.MyProfile().Department,
    JobTitle:Office365Users.MyProfile().JobTitle,
    Picture:User().Image
    }

After this, the error I get is that the user wasn't found.

I don't know what to put for Claims, I don't know how to get the correct information. I want to keep a log of the person who reported the issue, without needing the person to manually select themselves from a combobox or dropdown list.

Can anybody help?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source