I have developed a canvas app that connects to an Azure SQL table. Users can create new records or edit existing ones using a form control and this all works fine. My issue now though is that multiple users can be in records at the same time. As an example user A and user B could have the same record open. If user A makes some changes and saves the form their changes will be saved but then if user B makes changes these overwrite anything changed by user A.
I have read about using the Errors() function to check is a conflict occurs when saving the record but even when I have two users saving the same record there is never an error. I'm not sure if this is because I am using SQL as the datasource?
I'd be really grateful if someone could point me in the right direction, whether that's letting me know if Errors() should work for SQL or if there's another way of doing this. Thanks in advance for your help.
Hi gj84uw,
an idea of mine is, that you could save the record you want to edit in a variable before you edit it and then before you submit your changes, you could do a lookup to the record you want to change and compare it to your variable, to see if it was updated in azure while you were entering your changes.
Best
Numan
See https://docs.microsoft.com/en-us/power-apps/maker/canvas-apps/functions/function-errors#description for how to use the Errors() function to handle this issue.
User | Count |
---|---|
163 | |
86 | |
71 | |
64 | |
62 |
User | Count |
---|---|
210 | |
149 | |
97 | |
84 | |
66 |