I'm struggling to get my formula to do this. It seems that Patch and Defaults might be the way to do this, but I can't get it to work.
I'm building an app that tracks competency attainment. For any single competency, a user should be able to check a box stating whether or not they've attained that competency and should be able to take notes on how they did so. After doing that, I'm having the user hit a save button to write that to a Collection. If they ever revisit a competency's page, they should be able to update the Check Box and their notes. At first, I used the Create function to save the data, but then quickly realized that every button click appends a new row to the Collection.
I've resorted to trying to build an If Statement that searches for text within the Collection. If the text is not found, then a Create is executed. If the text is found, then a Patch is executed. Everything I've read says that Patch will serve both functions. I'm not sure what I'm doing wrong, but here's where I'm at:
If(UserData(Competency)<>BannerLabel_1_PMT.Text, Collect(UserData, {Competency:BannerLabel_1_PMT.Text, Attained:Checkbox_1_PMT.Value, User_Notes:UserNotes_1_PMT.Text}), Patch(UserData,{Attained:Checkbox_1_PMT.Value, User_Notes:UserNotes_1_PMT.Text}))
Where UserData is the name of my Collection. I'm invoking and unsupported function at the beginning of the function. Any help would be appreciated.