
Hi all,
I'm building a PowerApp for a database and require users to fill in specific datafields in order to create a score for each asset. These assets will be taken from a SharePoint list that have certain datafields populated but others are empty. I want the users to populate the empty datafields on the PowerApps form, with the populated datafields from the SharePoint list to come up as populated once the user opens the PowerApps form.
Each application will have it's own user. SharePoint has a field called "Application Owner," and so will the PowerApp form. So for example, when a new application is added onto the SharePoint list for User01, User01 will open PowerApps and see the form for the application with the field "Application Owner" already populated with "User 01", and the remaining datafields empty for User01 to fill in. How can I do this?
@KL007 - as I understand it, you have a Form which contains a field called 'Application Owner'. This field is a People Picker data type in SharePoint.
When a user opens the Form in NewMode, you want the People Picker field to default to the logged in user.
If my understanding is correct, apply the below to the DefaultSelectedItems property of the DataCardValue for that field:
If(
'Your Form'.Mode = FormMode.New,
{
DisplayName: User().FullName,
Claims: "i:0#.f|membership|" & User().Email
},
Parent.Default)
------------------------------------------------------------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.
If you like my response, please give it a Thumbs Up.
Imran-Ami Khan