
Hi everyone,
I have created a page for new users to register in the application:
And my SharePoint List:
Header:
Values:
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
Role values: (In SharePoint)
If you know any solution do share it.
Regards,
Sidhant
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
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