Skip to main content
Community site session details

Community site session details

Session Id : +pdmfcPywCZqEGUCLxpcMU
Power Apps - Building Power Apps
Answered

Variables, records and forms

Like (1) ShareShare
ReportReport
Posted on 8 Jul 2024 10:14:22 by 10

Hello, 

 

I am trying to build an app that allows a user to set a selection of variables from one form (Form_Variable) and pass these into a new submission form (Form_Deviation_1) that will be submitted multiple times. 

 

I have achieved success with most entries, however, the items that do get stuck and wont pull through to the SharePoint list correctly or at all are the users or dropdowns where you select a person that a deviation is logged against.

 

I understand that users are stored as a record (he says confidently). I am currently storing the selected individual as a variable using this code on a button:

 

Set(VarUSMDigitiser, DataCardValue14.Selected);

 

 

I have had no luck using this variable within Form_Deviation_1 on a person dropdown.

Currently the default for the dropdown is set as:

 

{Value:VarUSMDigitiser.DisplayName}

 

I have tried other record values too such as .Email  .Claims , all to no avail.

 

As mentioned, when submitting Form_Deviation_1 everything else that's been turned into a variable loads fine on SharePoint, however this person selection does not. 

 

Any assistance or guidance would be appreciated 🙂 

 

  • Koalatea Profile Picture
    10 on 15 Jul 2024 at 06:11:53
    Re: Variables, records and forms

    Thank you - Wasn't a complete copy and paste due to how my app is working but certainly helped get to a solution. 

     

    Thanks!

  • Verified answer
    anandm08 Profile Picture
    1,936 Super User 2024 Season 2 on 08 Jul 2024 at 10:20:03
    Re: Variables, records and forms

    hi @Koalatea ,

    For the second form (Form_Deviation_1), set the default value of the person field to the stored variable VarUSMDigitiser. However, instead of {Value: VarUSMDigitiser.DisplayName}, ensure you are passing the whole record.

     

    [VarUSMDigitiser]

     

    Ensure that the Items property of the ComboBox is set to a valid data source that includes user records, such as Office365Users.SearchUser({searchTerm: ""}) or the respective SharePoint list.

    When submitting the form, make sure that the variable VarUSMDigitiser is being used correctly in the Patch function or when you submit the form. A Person or Group field in SharePoint requires the user's Claims property to be properly set.

     

    Patch(
     SharePointListName,
     Defaults(SharePointListName),
     {
     Title: TextInput1.Text,
     DeviationLoggedAgainst: {
     '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
     Claims: VarUSMDigitiser.Claims,
     DisplayName: VarUSMDigitiser.DisplayName,
     Email: VarUSMDigitiser.Mail,
     Department: VarUSMDigitiser.Department,
     JobTitle: VarUSMDigitiser.JobTitle
     }
     }
    )

     

     

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473