How to conditionally display a choice list
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2019 10:22 AM
How might one go about conditionally displaying (or NOT displaying) a choice list on a field of type String, and then dynamically populating the choice list?
Scenario:
I have a field called "Value" that is defined as type String. When I am creating or updating the record, I want the Value field either to display as a Choice list (with dynamic choices specified by a Choice Script) OR to display as a standard Text field. I know how to do the Choice Script on a field to show dynamic choices, but I am not sure if there is a way to override the functionality. Ideally I would like to do this in a Client Script, rather than modify the Dictionary Entry for that field.
- Labels:
-
User Interface (UI)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-04-2019 11:55 PM
Is there a reason for wanting to use one specific field for this?
Sounds like you would have a lot less work with two fields. One that is a choice list and one that is a regular string field. You'd then only need to use UI Policies to handle the visibility.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2019 12:18 AM
Hi,
Agree with Joni's reply that you should create two separate fields with string and choice type. As per business logic show /hide those fields.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2019 05:33 PM
Agree with both replies -- this would be the most straightforward way to achieve that functionality. The reason for my question as stated is that I am looking to do this on an out of box component and I am looking to minimize my customization footprint, ideally not having to modify the table or dictionary entries at all. I was hoping that I could do this entirely from a UI script on an existing text field. From what I can find there does not seem to be a way to do this, so yes I will most likely either create a custom field or rethink my approach entirely.