
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2020 10:44 PM
Hi All
I have an issue with one of my catalog items, where the RITM page on the portal is showing a hidden field after you submit the request.
For example, here is the form
a client script is hiding some fields (i am using a client script because the field values are being generated dynamically by another client script... it's a painful form)
however when you hit submit, one of the hidden fields is shown on the RITM page
There is a a UI policy that hides all these fields on form load, then the client script takes care of turning them on or off depending on what the user selects. Both the script and UI policy are set to apply to cat items, req items and cat tasks.
this is the script
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
if (g_form.getValue('gis_request_category') == 'gis_map_production'){
g_form.setDisplay('gis_map_production_form',true);
g_form.setDisplay('gis_interactive_map_form',false);
g_form.setDisplay('gis_service_type',false);
g_form.setDisplay('gis_data_request_type',false);
g_form.setDisplay('gis_user_request_type',false);
}
else if (g_form.getValue('gis_request_category') == 'gis_interactive_map_request'){
g_form.setDisplay('gis_interactive_map_form',true);
g_form.setDisplay('gis_map_production_form',false);
g_form.setDisplay('gis_service_type',false);
g_form.setDisplay('gis_data_request_type',false);
g_form.setDisplay('gis_user_request_type',false);
}
else if (g_form.getValue('gis_request_category') == 'gis_imagery_services'){
g_form.setDisplay('gis_service_type',true);
g_form.setDisplay('gis_interactive_map_form',false);
g_form.setDisplay('gis_map_production_form',false);
g_form.setDisplay('gis_data_request_type',false);
g_form.setDisplay('gis_user_request_type',false);
}
else if (g_form.getValue('gis_request_category') == 'gis_data_management'){
g_form.setDisplay('gis_interactive_map_form',false);
g_form.setDisplay('gis_map_production_form',false);
g_form.setDisplay('gis_service_type',false);
g_form.setDisplay('gis_data_request_type',true);
g_form.setDisplay('gis_user_request_type',false);
g_form.clearValue('gis_user_request_type');
}
else if (g_form.getValue('gis_request_category') == 'gis_user_management'){
g_form.setDisplay('gis_interactive_map_form',false);
g_form.setDisplay('gis_map_production_form',false);
g_form.setDisplay('gis_service_type',false);
g_form.setDisplay('gis_data_request_type',false);
g_form.setDisplay('gis_user_request_type',true);
g_form.clearValue('gis_data_request_type');
}
else if (g_form.getValue('gis_request_category') != 'gis_interactive_map_request' | g_form.getValue('gis_request_category') != 'gis_map_production'){
g_form.setDisplay('gis_interactive_map_form',false);
g_form.setDisplay('gis_map_production_form',false);
g_form.setDisplay('gis_service_type',false);
g_form.setDisplay('gis_data_request_type',false);
g_form.setDisplay('gis_user_request_type',false);
}
}
Also if anyone knows how to get the RITM form to display the label for request category, rather than the value, that would be handy. The request category is one where the list values are generated dynamically (hence the need for a script)
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2020 11:14 PM
Hang on, i think i know
the script is clearing the values in the other two fields. Whereas service type has a value in it whether it's hidden or not, so i bet that's the problem.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2020 11:14 PM
Hang on, i think i know
the script is clearing the values in the other two fields. Whereas service type has a value in it whether it's hidden or not, so i bet that's the problem.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2020 11:17 PM
or operator need to update as well in script "||"
else if (g_form.getValue('gis_request_category') != 'gis_interactive_map_request' || g_form.getValue('gis_request_category') != 'gis_map_production'){
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2024 02:35 PM
How did you solve the problem?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2024 05:22 PM
This was a while ago - but from memory - basically the issue was that if the field is populated with any value, it will be visible no matter what. I set it to clear the value if the field was hidden and that resolved it i think
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2024 04:04 AM
Thank you Kai for the fast reply.
I'm getting the same problem but with selectbox field in record producer. I've already tryied g_form.clearOptions and set "clear value" in UI Policy, but when i submit the request, the summary is displaying the selecbox variable even it is hidden on the form.
Any thought?