web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Set a value for Choice...
Power Apps
Unanswered

Set a value for Choice column while Saving a Record

(0) ShareShare
ReportReport
Posted on by 986

Hi everyone,
I have created a page for new users to register in the application:

Sidhant_02_0-1676887789522.png

And my SharePoint List:
Header:

Sidhant_02_1-1676887913372.png

Values:

Sidhant_02_2-1676888017760.png


So what I want is let's say a new user registers in the application then I want to assign a Role (Choice column: Administrator, Employee, Manager) which is Employee to the new user, so how to do it while saving the record?.

Save Button:
On Save button, I am patching the App Users (SharePoint list) and then sending emails to notify them 

Sidhant_02_3-1676888263416.png


Role values: (In SharePoint)

Sidhant_02_4-1676888313025.png


If you know any solution do share it.

Regards,
Sidhant

Categories:
I have the same question (0)
  • Verified answer
    Sidhant_02 Profile Picture
    986 on at
    Re: Set a value for Choice column while Saving a Record

    Hi,
    I was able to get the solution for my requirement for which I just added the following line of code:
    Role:
    {
    '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
    ID: 0,
    Value: "Employee"
    }
    Where ID: 0 is the first value in the Choice column (as I want 'Employee' to be assigned for every new record) and to get the data from the SharePoint list I used '@odata.type', value should be: "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"

    New Record in SharePoint List with Role: Employee

    Sidhant_02_0-1676895027564.png

    Special thanks to @ v-micsh-msft (Michael Shao) who had answered a similar question on the forum and I came across it while looking for a solution and @SPDevOne for posting the query.
    Link : Used as Reference 

    If you found this solution useful, you can leave a thumbs up.
    Regards,
    Sidhant 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 757 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 322 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 209 Super User 2025 Season 2

Last 30 days Overall leaderboard