Some scripting task for practise

saran4
Kilo Guru

can anyone suggest me some scripting task for practise.

4 REPLIES 4

Mohit Kaushik
Mega Sage
Mega Sage

Hi Saran,

You can start with the basic question.

Populate the manager of the selected person in catalog item. 

Elaboration: Create two reference fields in one catalog item. 1-> Request for, 2-> Manager.

When you select a user in requested for variable then his/her manager should be auto populated.

 

Once you complete this i can give your more tasks to perform.

 

Please mark this as correct and helpful.

 

Thanks,

Mohit Kaushik

Thanks,
Mohit Kaushik
ServiceNow MVP (2023-2025)

Weird
Mega Sage

You can try these since something similar is usually requested:

1. Update parent when child's comments change.

2. On Catalog Item get current users information with GlideAjax, set those to variables and make them readonly if a value was found.

3. Create an ACL which will check if user is a a member of current assignment group and give them read access if they are.

4. Create BR which triggers an event which will be used to trigger a notification. The notification should use an email script which retrieves information from another record and prints that on the notification.

Hey

 

Could you please also list out the scripting task where we use workflow (g_scratchpad), script include, client script and also event triggering exercises.

 

Here's couple ideas.

1. Create a display business rule that stores server values on g_scratchpad and update form based on user selections and stored values with client script. 
For example you could have a display BR that stores information about the currently logged in user. Then if the user updates the form with certain choice, the client script could update a field with the users company.

2. Create a utility script include with functions to query information about a user or a company.
Your display BR could potentially use this script include to get the required data.

3. Create an event in event registry. Create a script action that updates records listed in parm1 with value on parm2. Trigger the event from a BR. (You can also trigger it from a client script if you use GlideAjax Script Includes). 


Note that g_scratchpad is not the same thing as scratchpad in workflows even if they do work similarly.