DropDown population from DB COlumn

Hi Team,

User is in need to enter Custom Values via Tempo Actions for a drop down list to fetch values, So We designed a DB table to store the custom values entered in the "Editable Grid" under Actions Menu(Tempo).

In the interface we are fetching column values from the DB column via query. Now when user is removing the values in editable grid under Actions Menu, the interface is throwing an error like

A dropdown component label=ABC has an invalid value for "value".All selected values must be present in the choice values array, but the value was "x" and choice values was "y,z,c,d"("X" is removed now in editable grid)

As we are querying the table , it should now fetch only the values present in table.but there may b few records that are still having the old values set to the field.is there a solution?How to handle this.

Please help.

  Discussion posts and replies are publicly visible

  • Hi,

    This is typical issue when managing references data. Here are 2 options you could consider to solve this issue /

    1. Do not allow user to delete values that are used. You can define an expression rule to check if the value is used , and then suggest the user to remove or update this value from the existing data. This is not the best approach but at least you won t get this error.

    2. As you mention, the dropdown will always have only active values, therefore if you try to display an existing object with the deleted value, you will have this error. Best way I found to avaid this is to create a custom dropdown which will always add the passed value in the list of dropdown if it s not present.

    Lest say you have you drop down contains these values a, b, c, d

    You then delete d, for existing data with values in a, b and c, the dropdown will always have the value, so you custom dropdown will not change the list, only active values will be used.

    But for existing data with value d, your custom dropdown will retrieve active values a,b, c from database and then add also d, so that the interface will showup and give the user the ability to change this value if needed or just update another value.

    Hope this help

  • Another option is to check to see if the value is active in the reference table or not.  If it is not present in the reference table, display a null value and force the user to update the value to one of the active values.  Look at using the contains function to check to see if the value is in the list of active values.