Adding or Editing a Users Information

Options
NWold
NWold Member

I am having my app formatted in which a user can pick up to 5 different pieces of information as shown:

If a user does not select all the values then Xano only stores the ones that were populated. My problem is that if a user wants to add more values then they cannot. For example, if a user chose 3 interests but wanted to edit it such that they have 5, Xano only has 3 rows to edit.

I tried utilizing the add/edit feature but I am not sure how to get it working for this. This is currently how my edit is working:

How can I correctly utilize add/edit, or other methods to allow a user to easily scale how many interests they want?

Tagged:

Answers

  • Lefteris - blupry.com
    Options

    Hey @NWold,

    The way Add/Edit works, is it will check if a record will match will exist with that specific field_value for the field you pick.

    If it does, it will edit the information, if it doesn't it will create a new one with the same information.

    One choice (and probably the easiest one) is to add a button "Add interest". In the "backend" of the frontend application you will get the number of the interests that user has, if he has 5, then the button should not appear (or appear disabled).

    Another way is to add all 5, and once retrieved, remove the ones that have null values (so if he picks 3, you add 5 and 2 of them have null values, but they still take place). I wouldn't suggest going with this.

    Add/Edit should really not be the case here either, considering that none of them would have one unique value for you to check if that exists.