Announcements
Id
Value
@odata.type
If( IsBlank( LookUp( ScoresList, AIITLE.Id = RecordsGallery1.Selected.ID && Rater = User().Email ) ), Patch( ScoresList, Defaults(ScoresList), { AIITLE: { '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference", Id: RecordsGallery1.Selected.ID, Value: RecordsGallery1.Selected.Title }, Rater: User().Email, 创新性: Rating2.Value } ), UpdateIf( ScoresList, AIITLE.Id = RecordsGallery1.Selected.ID && Rater = User().Email, { 创新性: Rating2.Value } ) )
It looks like the error is happening because RecordsGallery1.Selected is a record, but the AIITITLE field is expecting a specific value. You need to reference the column inside the selected record, for example RecordsGallery1.Selected.AIITITLE.
You can try updating your formula like this:
If(IsBlank( LookUp( 'YourListName', AIITITLE = RecordsGallery1.Selected.AIITITLE && Rater = User().Email )), Patch('YourListName', Defaults('YourListName'), { AIITITLE: RecordsGallery1.Selected.AIITITLE, Rater: User().Email, '创新性': Rating2.Value } ), UpdateIf('YourListName', AIITITLE = RecordsGallery1.Selected.AIITITLE && Rater = User().Email, { '创新性': Rating2.Value } ) ) //Replace YouListName with your SharePoint list name and correct the column name if it's wrong
The key change is using RecordsGallery1.Selected.AIITITLE instead of RecordsGallery1.Selected. This ensures you're passing the correct field value instead of the entire record.
Set( varExistingRating, LookUp( 'YourListName', AIITITLE.Id = RecordsGallery1.Selected.ID && Rater.Email = User().Email ) ); //Create new rating or update existing If( IsBlank(varExistingRating), Patch( 'YourListName', Defaults('YourListName'), { AIITITLE: { Id: RecordsGallery1.Selected.ID, Value: RecordsGallery1.Selected.ID }, Rater: User(), '创新性': Rating2.Value } ), Patch( 'YourListName', varExistingRating, { '创新性': Rating2.Value } ) )
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.
Jump in, show your community spirit, and win prizes!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Valantis 424
WarrenBelz 355 Most Valuable Professional
11manish 290