I am running a collection that is pulling a list of tags separated by commas from a database. I have a button in my PowerApp that I would like to run the following onselection:
1) run the collection
2) patch that column with the existing tags (that are separated by commas) plus one additional tag that I would like it to add to the list.
My code currently looks like this:
ClearCollect(Tags,LookUp(Active,ID = DataTable2_2.Selected.projectid).psa_tags); (this is to pull the correct tags based on ID)
ClearCollect(UpdatedTags, LaunchTags, ",Awareness"); (here im trying to add an 'Awareness' tag to the list of existing tags
Patch(
Activities
LookUp(
'Activities',
id = AssignItem.id
),
{psa_tags: UpdatedTags}
)
My issue is that the Patch function is running an error, this is because the UpdatedTags collection isnt collecting as a string. Its collecting as an object plus my text entry. Is there a way to collect the tags from the DB, add my tag to the string with an additional comma, and patch the column with my tag added?
Thanks for the help!