Want to have a choice field for each item selected in a 'List' type field on a form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2024 10:31 PM
Hi everyone,
I got a requirement where we have a 'List' field which refers to the cmdb_ci_service table. The client wants us to have a different choice field which has choices - Yes and No, for each of the item selected in the List field.
We gave them some workarounds-
1. Having 2 separate fields for Yes/No where they can selected the items accordingly.
2. Having a separate tab (since this is in the workspace) altogether.
They didn't approve the above two solutions. Can someone please help with the feasible workarounds to achieve the same?
Note: We want this in a table form (NOT on catalog)
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2024 04:47 AM
One option to get something close to this is to add one field with the type of Name-Value Pairs
With a Client Script onChange of the List field, if the list selections are being made on the form, you would populate this field with a JSON string containing the display value or whatever from each selected list record as the 'name' (list value # in the example below) with an empty 'value'. This would look something like this on the form (not a workspace in this screenshot
Then after adding some form text, training/guidance, and an onSubmit Client Script to validate and enforce it, the user would be expected to populate each empty box with Yes or No.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2024 11:19 PM
Hi Brad,
Thanks for a detailed response. But what they want is, on selection of an item in the list variable, a new row should get added along with the display name of the item. I checked on a few articles, and I think to make that dynamic, it is not possible to do it in an onChange client script.
We proposed a workaround for the same, and lets see how that goes.
But anyways, thanks for this as this will definitely come handy in the future.
Thanks,