Add comma separated list from browser storage to an advanced reference qualifier
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-17-2024 08:14 AM
An illustrated description of the problem:
I am trying to remove a record from a list of records, if already present in MRVS.
(The general idea is to add the value from MRVS to a condition filter on a variable so the record does not appear in list)
Example:
1. Initial list displayed to user inside of MRVS.
2. A User adds a row. Example Apple.
Current OoB design
Out of box:
- The value (Apple) will still be in the list even though already selected.
- Nothing has been written yet to system.
- Upon submit of form the sc_multi_row_question_answer is updated with values in MRVS rows.
- OnChange client scripts do not run when Add is clicked (MRVS), the onChange runs after new selection (ex. Banana). So, this is too late to filter a value from the list.
Possible solution:
- There is an onLoad catalog client script in a MRVS that returns a list of comma separated Sys IDs.
- The list is updated after a row is added to MRVS.
- I have confirmed the correct values in list are being captured using an alert.
- Local session storage is being used to make the values available to other scripts.
As shown above, the purpose of the list is to add the Sys IDs to an advanced reference qualifier; with result of user not seeing value already added to MRVS.
The advanced reference qualifier is already a bit complicated with:
- Five typical reference qualifiers.
Ex. 'install_statusNOT IN7,8,17,^' - One advanced reference qualifier 'assigned_to=' + current.variables.u_submitted_for;
at the end of the advanced reference qualifier. (So, I am not sure if I can add any more actions here...)
Considering the above advanced reference qualifier;
Is there a way to add a does not contain filter with data from local session storage?
Thanks for your time,
Lon