I am building the canvas app for the power apps challenge , and I was doing well until trying to update the Animal_Shelter Status I get an error I cant seem to get by this is my formula in my save button:
Patch(
'Foster Families',
Defaults('Foster Families'),
{
Foster_ID: Foster_ID_DataCard1.Default,
'Foster_Claimer Name': DataCardValue_ClaimerName.Default,
'Foster_Join Date': Today(),
'Foster_Local Shelter': SelectedShelter_name,
Foster_Location: Foster_Location_DataCard2.Default
}
);
// Provide feedback to the user
Notify("Foster family record saved successfully!", NotificationType.Success);
Patch(
Animals,
LookUp(Animals, Animal_ID = Animal_ID),
{
'Animal_Shelter Status': Value(3), // this is where I cant update this value to choice 3 label in foster home
'Animal_Current Location': SelectedShelter_ID,
'Animal_Foster Claimer': Foster_ID_DataCard1.Default
}
);
// Provide user feedback
Notify("Foster animal record updated successfully!", NotificationType.Success);
this is the errror I am getting:
The type of this argument 'jcfph_shelterstatus' does not match the expected type 'OptionSetValue (Animal_Shelter Status (Animals))'
these are the ways I have tried to set that value:
'Animal_Shelter Status': { Value: 3 },
'Animal_Shelter Status': 3,
Animal_Shelter_Status: "In Foster Home",
I get in all the same expected type optionsetvalue