
- 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 10:52 PM
Open your variable in native UI view and you will see "Availability" tab, there is checkbox field "Visible on Summaries" just set it as false.
Screenshot for eg:
Now you will not see it there.
same way you will do for rest of other variables which you want to hide there.
If my answer helped you, kindly mark it as correct and helpful.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-12-2020 11:00 PM
Hi Harshvardhan
The only problem with that, is then the variable is not visible under circumstances when i do what it presented.
eg. if you were to pick "Imagery Services" under the request category, the form will present the "service type" field for selection.
Under that circumstance, I would want it in the RITM summary - as the user has selected something from it.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-12-2020 11:06 PM
the screenshot which you have added and highlighted that's widget , so if you will write client script to hide that, then it will not work there.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-12-2020 11:12 PM
it's hiding all the other fields though.
e.g. if you pick request category = data management, the "user request type" field is hidden on the RITM summary page.
if you were to pick request category = user management, then that field is shown - and the "data request type" field is hidden.
it is only this one "service type" field that isn't playing ball for some reason