How to add choice list dynamic in future if required
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2025 03:29 AM
example requirement
How to Create a Dynamic Language List Without Using a Separate Table?
I need to create a dynamic dropdown list for languages (e.g., German, English) in a form. The key constraints are:
- ✅ I should be able to add more languages later (e.g., Hindi, Chinese, etc.).
- ❌ I cannot create a separate table to store the language list.
- ❌ I want to avoid using scripts (like Script Includes or Client Scripts) so that it's easy for other developers to maintain in the future.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2025 07:23 AM
Hi @PraveenS8474123,
have you installed and activated the language packages?
It's a form of internationalisation plugins
/* If my response wasn’t a total disaster ↙️ ⭐ drop a Kudos or Accept as Solution ✅ ↘️ Cheers! */
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2025 09:11 PM
Hi @GlideFather
I have given language as example requirement. Main aim to add Dynamic List Without Using a Separate Table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2025 06:45 AM
@PraveenS8474123 and dynamic list to what field?
If it is a choice type then you can use [sys_choice] table and then dynamically hide/display the options with client script.
It'd be on change or on load according to your exact requirement, get inspired from this post:
Let me know if this answered your question
/* If my response wasn’t a total disaster ↙️ ⭐ drop a Kudos or Accept as Solution ✅ ↘️ Cheers! */
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2025 06:53 AM
@PraveenS8474123 or here:
GlideForm - addOption(String fieldName, String choiceValue, String choiceLabel)
Adds a choice to the end of a specified choice list field.
fieldName | String | Name of the field in which to add the choice field option. |
choiceValue | String | Value to store in the database. |
choiceLabel | String | Value to display. |
void |
Example
g_form.addOption('priority', '6', '6 - Really Low');
GlideForm - addOption(String fieldName, String choiceValue, String choiceLabel, Number choiceIndex)
Adds a choice to the list field at the position specified.
fieldName | String | Name of the field in which to add the choice field option. |
choiceValue | String | Value to store in the database. |
choiceLabel | String | Value to display. |
choiceIndex | Number | Order of the choice in the list. The index is a zero-based array. |
void |
Example
g_form.addOption('priority', '2.5', '2.5 - Moderately High', 3);
GlideForm - removeOption(String fieldName, String choiceValue)
Removes the specified option from the specified choice list.
fieldName | String | Name of the field from which to remove the option from the choice list. |
choiceValue | String | Value stored in the database. This is not the label. |
void |
Example
g_form.removeOption('priority', '1');
/* If my response wasn’t a total disaster ↙️ ⭐ drop a Kudos or Accept as Solution ✅ ↘️ Cheers! */