admin管理员组文章数量:1314442
Problem:
I am trying to use the Patch function in PowerApps to update a SharePoint list named City
. The City
list contains a lookup column Country
referring to the ID, which has additional fields Language
and Title
marked in its definition. However, I am encountering the following error messages:
Version 1:
"The field 'Country_x003a__x0020_Title' is required."
Version 2:
"Error in 'City': Invalid data was used to update the list item. The field you are trying to update may be read-only."
Lists:
- Country: Contains fields
Title
,ID
, andLanguage
. - City: Contains fields
Name
,Citizen Count
, a lookup forCountry
, and an additional lookup forLanguage
.
Code:
Here is the code I tried:
Version 1
Patch(
City;
Defaults(City);
{
Country: {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference";
Id: CurrentItem.ID;
Value: CurrentItem.ID;
'Country_x003a__x0020_Title': CurrentItem.Title; // Correct internal name
'Country_x003a__x0020_Language': CurrentItem.Language // Correct internal name
};
}
)
Version 2
Patch(
City;
Defaults(City);
{
Country: {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference";
Id: CurrentItem.ID;
Value: CurrentItem.ID;
};
Country_x003a__x0020_Title: {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference";
Id: CurrentItem.ID;
Value: CurrentItem.ID;
};
}
)
Details:
- The
Country
lookup column requires theTitle
field to be populated. - I have verified that the internal names of the fields in the SharePoint list match those used in the Patch function.
- The error persists even though I am providing values for
Country_x003a__x0020_Title
andCountry_x003a__x0020_Language
.
Question:
How can I resolve this error and successfully patch the Country
lookup column with the required fields in PowerApps?
本文标签:
版权声明:本文标题:PowerApps Patch Sharepoint lists with Lookup fields throws errors when patching multiple lookupfields - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741969843a2407767.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论