who can i ask for access to amend the walkup experience application ?

chercm
Mega Sage

i plan to add a field to lookup user asset in the interaction form 

 

how can i ask to remove the restriction ?

 

chercm_1-1702382434936.png

 

2 REPLIES 2

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @chercm 

 

Have a look here

https://www.servicenow.com/community/itsm-forum/how-to-customize-walk-up-experience/td-p/630819

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

@Dr Atul G- LNG  that is not what i was referring to . i created a user_asset field in reference to alm_hardware table and i want to display all the user asset when the interaction form loads 

 

 

chercm_1-1702389373154.png

 

chercm_0-1702388424531.png

and i ask chatgpt and it given me below but it is not working 

 

To create a field on a ServiceNow Walk-up Interaction form that looks up user assets from the alm_hardware table based on the opened_by field, you can use a combination of reference fields, client scripts, and possibly a Script Include for server-side processing. Below are the steps to achieve this:

1. Create a Reference Field on Walk-up Interaction Table:

  1. Navigate to ServiceNow Studio > Tables.
  2. Open the Walk-up Interaction table.
  3. Create a new reference field, let's call it user_asset.
  4. Set the Reference field to reference the alm_hardware table.
  5. Configure the Reference Qualifier if necessary to filter assets based on the opened_by field.

2. Create a Client Script:

  1. Navigate to ServiceNow Studio > Scripts - Client Scripts.
  2. Create a new Client Script and name it something like WalkupInteractionClientScript.
  3. In the script, use the onLoad function to trigger the lookup when the form loads:

 

javascriptCopy code
function onLoad() { // Get the value of the 'opened_by' field var openedBy = g_form.getValue('opened_by'); // Check if the 'opened_by' field is not empty if (openedBy) { // Make an asynchronous request to the server to get user assets getUserAssets(openedBy); } } function getUserAssets(openedBy) { // Create a GlideAjax instance to make a server-side script include call var ga = new GlideAjax('YourScriptIncludeName'); // Replace with the actual name of your Script Include ga.addParam('sysparm_name', 'getUserAssets'); ga.addParam('sysparm_opened_by', openedBy); // Make the AJAX call ga.getXML(handleResponse); } function handleResponse(response) { if (response) { // Parse the JSON response var result = JSON.parse(response.responseText); // Check if the response was successful if (result && result.success) { // Set the value of the 'user_asset' field with the received assets g_form.setValue('user_asset', result.userAssets); } else { // Handle errors alert('Error fetching user assets: ' + result.error); } } }

 

 

3. Create a Server-Side Script Include:

  1. Navigate to ServiceNow Studio > Scripts - Script Includes.
  2. Create a new Script Include and name it something like YourScriptIncludeName.
  3. In the script include, create a function to process the server-side request:

 

javascriptCopy code
var YourScriptIncludeName = Class.create(); YourScriptIncludeName.prototype = Object.extendsObject(AbstractAjaxProcessor, { getUserAssets: function () { var openedBy = this.getParameter('sysparm_opened_by'); // Query the 'alm_hardware' table based on 'opened_by' field var userAssets = new GlideRecord('alm_hardware'); userAssets.addQuery('assigned_to', openedBy); userAssets.query(); // Process the results var result = []; while (userAssets.next()) { result.push({ name: userAssets.getValue('name'), // Add other fields as needed }); } // Return the result as JSON return new JSON().encode({ success: true, userAssets: result }); }, type: 'YourScriptIncludeName' });
 

4. Add Client Script to the Form Layout:

  1. Go to ServiceNow Studio > Forms.
  2. Open the Walk-up Interaction form.
  3. Add the WalkupInteractionClientScript to the form layout.

5. Test the Walk-up Interaction Form:

  1. Create or open a Walk-up Interaction record.
  2. Select a user in the opened_by field.
  3. The user_asset field should automatically populate with the assets associated with the selected user