I am trying to create a simple form for users to update a sharepoint list when they review a document. They are choosing the document from a filtered gallery based on Document Number and Title. I have set current User in the App OnStart property.
Set(_CurrentUser, User())
And I have the DefaultDate set to "Today()" in the DatePicker1 element.
I've managed to narrow down what is giving me an error, to two elements(Removing them allows the form to submit). I just can't figure out how to get them to work.
"ProcedureIsAccurate: Radio1.Selected.Record,
Reviewer: 'Current User_1'.Text,"
Here is the Gallery control that takes you to the form and sets the variable
And here is the OnSelect property of the form.
And finally, here is the List settings of the sharepoint
Thanks for any help.
Solved! Go to Solution.
The syntax for the 2 parts that don't work would look like this:
ProcedureIsAccurate:{
'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Value:Radio1.Selected.Record
},
Reviewer:{
'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims:Concatenate("i.0#.f|membership|",_CurrentUser.Email),
Email:"",
Department:"",
DisplayName:"",
JobTitle:"",
Picture:""
}
This is based on the assumption that Radio1.Selected.Record returns the text value for your choice column, so you might want to double check that.
The syntax for the 2 parts that don't work would look like this:
ProcedureIsAccurate:{
'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Value:Radio1.Selected.Record
},
Reviewer:{
'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims:Concatenate("i.0#.f|membership|",_CurrentUser.Email),
Email:"",
Department:"",
DisplayName:"",
JobTitle:"",
Picture:""
}
This is based on the assumption that Radio1.Selected.Record returns the text value for your choice column, so you might want to double check that.
This did make some forward progress. But on the validation I got an error that it didn't save. I'm the one that created the Sharepoint List, so I'm not sure why it would say membership could not be found.
Could this be a problem with the Label using "User().FullName" as the "Text"?
Yes, Email is what you need to provide, rather than Full Name, to set the value of person column. Email is a unique identifier, whereas Full Name isn't.
Okay so this is where I may need a little more handholding.
App-Onstart is set to "Set(_CurrentUser, User())"
I changed Current User_1 Text to "User().Email" and I'm still getting the error.
To diagnose this further, I would try hardcoding your email address into the Claims section like so. Do you still get the error "the specified user could not be found"?
Reviewer:{
'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims:"i.0#.f|membership|yourname@yourdomain.com",
Email:"",
Department:"",
DisplayName:"",
JobTitle:"",
Picture:""
}
No, now I'm getting "Invalid Argument type. expecting a Record value, but of a different schema"
That's strange. If you try hardcoding your email using the syntax beneath (which didn't previously cause an incorrect schema error), does that still return an incorrect schema error?
Reviewer:{
'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims:Concatenate("i.0#.f|membership|","EnterYourEmailHere@YourDomain.com"),
Email:"",
Department:"",
DisplayName:"",
JobTitle:"",
Picture:""
}
Now it is back to "Specified user could not be found"
I'm thinking I might just switch the Person column in SP to Text and not worry about the Person field. I don't actually need it linked, and Sharepoint is tracking via "modified by" anyways.
Thank you so much for your help. I'll accept up top as solution. You've gotten me through a log jam I've been fighting for days.
You're welcome @AJL47
With the person column, it doesn't seem to recognise the user based on the email address which is quite difficult to diagnose. I agree that switching to a text column is probably the easiest solution right now.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
199 | |
71 | |
48 | |
41 | |
30 |
User | Count |
---|---|
264 | |
121 | |
94 | |
89 | |
82 |