I have a collection of 70 items, and I want to use the same text_input to update them all. Currently, on my save button on select I am using a if statement which is very long.
If(
temp_category = "boundary_hoarding",
Patch(
temp_site_weekly_inspection,
First(temp_site_weekly_inspection),
{boundary_hoarding_comment: view_comment_text_input.Text}
);,
temp_category = "welfare_facilities",
Patch(
temp_site_weekly_inspection,
First(temp_site_weekly_inspection),
{welfare_facilities_comment: view_comment_text_input.Text}
);
);
However, I was wondering if it possible to use my temp_category value instead of column name to update the right field.
Patch(
temp_site_weekly_inspection,
First(temp_site_weekly_inspection),
{temp_category: view_comment_text_input.Text}
But, I get the following error "The function 'Patch' has some invalid argument.
Thanks in advance for any suggestions.