Scenario:
Collect(collection, { user: " ", notes: " ", image: " ", date: " ", time: " " })
Patch(collection, {image: takenPicture.Image})
Why is this happening and how can I overcome it?
Thank you
Solved! Go to Solution.
Hi @seadude
The second argument to the Patch function needs to specify the record in the collection that you want to update.
Supposing that you want to update the first record (the record that you created in the OnStart of your app), the syntax you would use would look like this:
Patch(collection, First(collection), {image: takenPicture.Image}
)
Hi @seadude
The second argument to the Patch function needs to specify the record in the collection that you want to update.
Supposing that you want to update the first record (the record that you created in the OnStart of your app), the syntax you would use would look like this:
Patch(collection, First(collection), {image: takenPicture.Image}
)
This is a great solution @timl, thank you. Do you know of straightforward code that will Lookup a unique record ID and Patch into that record rather than the First?
This is a tough scenario that I often encounter and have to hack something together. Would be nice to see others' solutions and develop a standard myself.
Example:
Thanks again!
Figured it out.
Needed to set a PK in the SQL Table then refresh Data Source for PowerApps to likey.
See @Anonymous's last reply here: https://community.powerapps.com/t5/Connecting-to-Data/The-first-argument-of-Remove-should-be-a-collection/m-p/93838/highlight/true#M1031
Hi @seadude
Apologies for not replying sooner. Glad you figured it out! For the benefit of anyone else reading this, the formula would look like this:
Patch(collection, Lookup(SQLDataSource, UniqueIDColumn=1234), {image: takenPicture.Image} )
User | Count |
---|---|
256 | |
111 | |
95 | |
48 | |
40 |