assigmentGroup_defaultvalue

yardenKrispel
Tera Contributor

Hi I need help! I made a script that as soon as I write down the name it automatically returns its sys_id to me, I made the script in script included and then I connected it with the default value and it doesn't work, I attached pictures of it I would appreciate help and corrections thanks

 

 

yardenKrispel_0-1700406344392.pngyardenKrispel_1-1700406375611.png

 

18 REPLIES 18

this is script included

yardenKrispel_0-1700411648001.png

This is the group name found in the group table

yardenKrispel_1-1700411709548.png

yardenKrispel_2-1700411763534.png

and this default value

yardenKrispel_3-1700411840067.png

 

 

Community Alums
Not applicable

@yardenKrispel 

You should not get the 'invalid default value' error in Dictionary. Try reload the form, do you still see that?

Also what are those steps you did to test it?

I recommend go to Incident -> Create New

New record.PNG

And try to test it with another group which is in alphabet.

My intention was this:
I have a group in the group table called "support center" and it has a sys_id and I want that as soon as I open incdent the name of the group "support center" will automatically appear in the Assignment group field. Now I don't want to do it manually and simply copy the sys_id to the default value. The requirement from my side is I will make a script that according to the name in the folder table will give me the sys_id and then I will connect this function to the default value

Community Alums
Not applicable

@yardenKrispel , I get your requirement and my solution solves it, also tested it myself.

 

However, you just said whenever you open the incident, but the approach you initially did at the Dictionary tab will only work when you create new task record (example: incident). Test again in new incident form.

 

It works for me thanks a lot for the help! Now another question if I want the skippert to already have the group itself and it will return the sys_id without me writing in the default value the name of the group but only the name of the function and this is how I change it in the code?