Select field showing empty after form submission

Not applicable

Hi everyone,

I have a catalog form with a select box that is empty by default. After you use a reference field to pick the name of an assignment group in the system, I have an onchange script addOption() all the members of that group to the select box. It works pretty slick when you are filling out the form.

After you submit the form, the RITM shows that the select box is completely empty again. I imagine it's because all the values were magically added via script and it didn't store any of them as values (I want the entire list of names to be in that varaible when the task-worker sees the RITM.

How do I go about doing that?

6 REPLIES 6

Jace Benson
Mega Sage

Off the top of my head, I think if you make your dropdown start with those options when it get's to the task it should show the appropriate option but it will not filter appropriately.

Based on what you've given I'd ask this;
Would it be acceptable to show a free text field on the task showing the user's name? If so, add another on change but place it on the dropdown and fill in the text field. On the tasks show that variable instead of the dropdown.

If not, well I'll sleep on it and get back to you.


neetusingh
Giga Guru

Hi Jace/Geek,

I am also facing the same issue. Please let me know, if any you got any solution on the same.

Regards/Neetu


Mahira
Tera Guru

This sounds like one field depending on the other...
If you are on Calgary release , wiki says there is a way..

http://wiki.servicenow.com/index.php?title=Reference_Qualifiers_for_Service_Catalog_Variables


matt_hedtke
Kilo Contributor

In your onChange() script do you have the following?:

if (isLoading) {
return;
}

I had a similar issue one an Order Guide and after I added the above it fixed it.