I have a table in CDS that I'm building a Power App form to insert into. One of the fields is a Lookup combo box pulling data from another CDS table. Initially everything worked fine on the form, but when I click submit, this field does not save. I did some research and found posts that appeared to address the issue:
Lookup Field not Saving
The recommended solution is to add the following text to the update field:
If(
!IsBlank("ProductionPlantValue5),
(
{
'@odata.type': "Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Id:"ProductionPlantValue5.Selected.ID,
Value: "ProductionPlantValue5.Selected.Production_x0020_Plant1
}
)
)
My values are as follows:
Control Name: DataCardValue13
Column Value to Reference Display Name: Name
Column Value to Reference Data Field Name: cr5ed_name
If(
!IsBlank(DataCardValue13),
(
{
'@odata.type': "Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Id:DataCardValue13.Selected.cr5ed_id,
Value: DataCardValue13.Selected.cr5ed_name
}
)
)
All variations of this statement throw an error and no record is created at all. I am not sure what to put in place of the "ID" listed in the Id line of the snippet above. The table I am referencing was loaded from excel, so the unique identifier column appears not to have been populated and has only blank values. I created a separate unique key and referenced that (cr5ed_id) but that is not working either.
@WarrenBelz helped answer the original post by @Bartron . Any insight you guys can offer would be highly appreciated! Thanks!