Prompt user to save if record is changed - comparing lots of fields

Hi all - thanks for taking a look.

I’m looking for an efficient way to address something in my app.
I’d like to stop the user from leaving the page if they’ve made a change to any of the fields and have not saved those changes. Offering them to save, or discard the edits.

I have a high number of fields (80 ish) and while I could use the expression builder, it would be a very long expression which is difficult to edit / amend. I wonder is there a more efficient way of doing this?

Diagram here to help with explanation. Would really appreciate any advice on how this can be handled.

Thank you!
Rob

What about when an input’s value is changed, set a state to be true. Doesn’t handle the edge case where user changes then reverts an input but might be quicker to implement than a conditional that is ‘Only when input’s value is not Current User’s X or….’ for every input…

2 Likes

Thanks George - In explaining the problem, it helped me think about it more.

I think probably I’ll have an element which is visible when anything is changed, and reference that for the ‘Only when X is not visible’ perhaps.

That way I can use conditions and keep each field to a separate row. Slightly tedious to set up but more flexible / editable in the long run.

1 Like

I don’t think it is possible to do it easily. Unfortunately you will have to do something like @georgecollier suggested or a single workflow to check field by field…. There is no other way.

What about auto binding??

1 Like

Why not just place a group inside a hidden popup and make the data type of the group yes/no? That’s easier to manage than showing and hiding groups.

Yes, good idea George - Will give that a try! Thanks :slight_smile:

Rpetribu - That’s how I built the original, but unfortunately the client wanted the alternate function.

1 Like

Def the simplest approach! In terms of the edge case issue pointed out by @georgecollier, I’ve seen such behavior (being prompted to save changes when no changes have been made) on some app of major companies so while it’s not great UX it’s done by some of the big guys so should be more palatable.

This topic was automatically closed after 70 days. New replies are no longer allowed.