I have a multi step form that creates a new row in a table. When user goes back and fort in the steps, a new row is created with the same data.
How can I prevent duplicate data in the target table?
Would be helpful if you can share more about how you have set it up.
With a multi-step form, usually a row isn’t added until a user gets to the final step and submits. If the process of navigating the form is adding extra rows, then that suggests something is wrong with your setup. But without knowing/seeing what you’ve done, it’s very difficult to say exactly what the cause is.
The app is a golf score card.
The setup is, for every step (hole) score is entered, next hole button is clicked to input score for next hole.
On click (next hole) create new row in hole score table for data of previous hole. Reason for this is to be able to present live scores (Leader board - for public) as players enter scores.
I hope this is clear enough
Okay, so probably what you want to do is create some logic in the attached table to check whether or not the row for the previous hole already exists. And then modify your action so that a new row is only created if it isn’t already there.
Can’t seem to get the logic right
any pointers will be appreciated.
Can you show me what the data looks like, and what you have tried?