Saving data when selecting option

Asked

Viewed 41 times

0

I have an Activity that has a list. In this list, the fields are almost all RadioButton. Currently, when the user saves the selected data in this list, a reading of all the RadioButton to know which one is marked. If you have, you get the answer, if you don’t have to read it anyway.

This procedure I have found slow, and there are possibilities of the amount of fields increase, because this Activity is dynamic, being able to decrease or increase the amount of field.

I thought of something which is my question: Would be correct or have any problem at, when the user selects the field I already save in the bank what he chose? And if he needs to change, go to the bank again and change that record?

That is, to the extent that the guy is marking, the data will already be recorded in the database.

Thanks!

  • Always post reference codes to help :)

1 answer

0


Theoretically, this could be an option viable , but think of it this way:

And if the user clicks on the wrong Radiobutton?
It will always store in the database the option that was clicked, being the one that the user wanted or not. The downside is that you will be constantly entering information into your database.

Possible Solution:
When the user selects a Radiobutton, he will be confronted with a message asking if it is really that Radiobutton he wants to select or if he wants to make any changes. This way you avoid constantly entering information in your database and having to delete it.

  • That’s exactly what I was thinking. But since it’s a form completion, it can be a problem to always submit a text to confirm. This will slow down and discourage filling out the form.

  • Being then a form completion, at the end of your completion you can make a page available to the user asking him if the information entered is correct or if he wants to change something, and only after confirmation send to the database

  • I get it. I just don’t want to take the data from the Radios because it’s slow. I already do it. When it’s at the end of the form, there’s a FINISH button. When the user clicks on it, a reading of the selected Radios is made and only then is recorded in the database. But this has become slow as the forms have more questions. Where I would store the data before saving, so I wouldn’t have to take it straight from the Radios?

  • You should only do this reading of the Radios at the end of the form, right after the user click "Finish", because as it goes filled and you are storing what it fills, it will make your system slower, whether or not to enter it directly into the database, even if it is just storing it. The verification of the entered data should, in my opinion, only be done at the end, thus avoiding storing information as the form is completed, making it slower at the end

  • I understand Fabio. I want to thank you for your attention. But it takes me a doubt: this my question here, is because I thought that, as it is taking a while to finalize the Activity while saving, this procedure was risky to lose the form. As there are many Radios, all are read to know which is marked. But this way you are indicating me, I already do it.

  • Anyway you can do the / validation check of all these Radios, after the user click the Finish button and immediately before running the event from the button. If everything is in agreement and the user does not want to make any changes to what was selected by him, then you write in the database and that’s fine. Your Activity may be taking a while to finish because you are collecting Radio a Radio as the user clicks. If the user selects a Radio option by mistake, you will be restricting the performance of your Activity, thus slowing down.

Show 1 more comment

Browser other questions tagged

You are not signed in. Login or sign up in order to post.