Forum Discussion

Tom_R's avatar
Tom_R
New Contributor III
28 days ago

Cannot save same value from parameter twice in SQL Table Editor

I have created an SQL table editor component for one of my applications.  One of the columns in the SQL table can be updated by the user, and is tied to a parameter that is used as a dropdown by the users. 

However, if the user tries to update that column in two rows to the same value only the first row will be saved, but if the two rows are populated with different values from the linked parameter the table is saved just fine.

Has anyone else experienced this?  Has anyone discovered a workaround?

Thanks,

Tom R

2 Replies

  • RobbSalzmann's avatar
    RobbSalzmann
    Valued Contributor II

    Trying to understand this better... Let's say your column is "Color", and when you update the column in two different records, to say "Blue" and "Green", your dropdown tied to this column now shows "Blue" and "Green" as choices.

    Also, if the user updates those two records to both be "Blue" and "Blue", you want the associated dropdown to list "Blue" twice?

    When you say "One of the columns in the SQL table ... is tied to a parameter" is it bound to the column?  If so, consider creating a parameter that queries the column in your table directly to get the full contents.

  • Tom_R's avatar
    Tom_R
    New Contributor III

    To expand on your example, if there is a table with the columns 'UserName' and 'Favorite_Color'.   The 'Favorite_Color' column has a bound parameter linked to it.  The bound parameter would provide a list of options to the user, e.g. blue, green, yellow. 

    These values are independent of what is currently stored in the table rows. 

    When the user queries the table, and decides to change the 'Favorite_Color' value for multiple users, updating this field in row 1 to be blue, and then updating the field in row 2 to be green the table would save the updated data from both rows.  If the user updates the field in row 1 to be blue, and the field in row 2 to be blue, then the table is only saving the update to the first row.  When the same value from the linked parameter is used while trying to update multiple rows, the updates are not captured, and the user is having to update and save the table 1 row at a time.