i have a reference variable on my catalog item select_incident refer to incident table.…
- User
i have a reference variable on my catalog item select_incident refer to incident table. my requirement is when i select any incident from there and try to submit the catalog request then it will check the priority of that incident, if the priority of incident is 1 then show a popup on screen that priority is High not able to submit the request and prevent me to submit the request
- Assistant
- User
i have a reference variable on my catalog item select_incident refer to incident table. my requirement is when i select any incident from there and try to submit the catalog request then it will check the priority of all parent incidents, if the priority of incident is 1 then show a popup with the names of those incidents on screen that priority is High not able to submit the request and block user to submit the request untill no incident with high priority is fetched
- Assistant
- User
change this code to wait for the response from server side and abort user to submit the catalog item request if the condition of script matches and untill the code has run properly g_form.getReference('select_server', function(ref) { var ip_address = ref.ip_address; var ga = new GlideAjax('CheckOpStatus'); ga.addParam('sysparm _name', 'getParentNames' ); ga.addParam('sysparm_ip_address', ip_address); ga.getXMLAnswer (function(answer) { var result = JSON. parse(answer); if (result.length > 0 ) { var names = result.join(', '); alert("servers tagged to the Physical server " + result.join(', ')); g_form.clearvalue('select_server'); } }); });
- Assistant
- User
not working. give me the code that runs before submitiing the form and prevent the user to submit the catalog request. because fetching the details takes time from this code and untill we want to prevent the user from submiiting the request
- Assistant
- User
apply this approach to this code
g_form.getReference(‘select_server’, function(ref) { var ip_address = ref.ip_address; var ga = new GlideAjax(‘CheckOpStatus’); ga.addParam(‘sysparm _name’, ‘getParentNames’ ); ga.addParam(‘sysparm_ip_address’, ip_address); ga.getXMLAnswer (function(answer) { var result = JSON. parse(answer); if (result.length > 0 ) { var names = result.join(', ‘); alert("servers tagged to the Physical server " + result.join(’, ')); g_form.clearvalue(‘select_server’); } }); });
- Assistant
- User
restrict catalog item submission until client script is not fully validated the records and query in servicnnow
- Assistant
- User
your above approach is not working i tried many times, dont give me again
- Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.