- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-25-2019 07:50 AM
Hi SN DEV Community!
I understand that currently the 'Question Choice' table located within a Select Box variable does not contain an active flag, as a result we're unable to mark a selection as inactive. While we can delete the item, this goes against our internal best practice guidelines as well as pose an issue if a report is later created and filtering on the deleted item.
As a result, are there any preferred methods in which to deactivate the drop-down question choice selection from the select box?
Some items I was considering were:
- Create a custom u_active attribute on the question choice table, however, i haven't been able to find a good method in which to do this yet
- Create a stand-alone onLoad client script on the form to simply hide the drop-down selection, although this can get messy over time as well as contribute to a slight performance impact on the form
Thanks.
Ravi
Solved! Go to Solution.
- Labels:
-
Instance Configuration

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-25-2019 11:05 AM
Hi Ravi,
I do understand your concern, and unfortunately we do not have the active field on the "question_choice" table due to which we can not deactivate any choice from the variable.
For your first consideration, I believe you can do that by creating a before - query business rule on "question_choice" table and add the below code which will restrict the querying of the choice records which are active false, however you will face an issue where the choices which will be turned false will exist in system but not be visible, neither in the drop-down nor in the list.
current.addQuery('u_active','true');
I would suggest you to go with your Second consideration, and have a OnLoad Client Script, and add the below piece of code:
g_form.removeOption('field_name','choice_value');
Also, I do agree that Client Script downgrade the system performance while loading the form, however I believe a small piece of code in your scenario is not going to hamper much....!
Kindly Mark my answer as Correct/Helpful based on the impact.
Regards,
Alok

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-25-2019 11:05 AM
Hi Ravi,
I do understand your concern, and unfortunately we do not have the active field on the "question_choice" table due to which we can not deactivate any choice from the variable.
For your first consideration, I believe you can do that by creating a before - query business rule on "question_choice" table and add the below code which will restrict the querying of the choice records which are active false, however you will face an issue where the choices which will be turned false will exist in system but not be visible, neither in the drop-down nor in the list.
current.addQuery('u_active','true');
I would suggest you to go with your Second consideration, and have a OnLoad Client Script, and add the below piece of code:
g_form.removeOption('field_name','choice_value');
Also, I do agree that Client Script downgrade the system performance while loading the form, however I believe a small piece of code in your scenario is not going to hamper much....!
Kindly Mark my answer as Correct/Helpful based on the impact.
Regards,
Alok
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-28-2019 11:12 AM
Thanks Alok!
Ravi