Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Need some Info/Help on the Skills Table

terrieb
Tera Guru

So we want to add the Skills field to Catalog tasks so mangers can assign to staff based on their current skill level.

 

We like the ones under the Technical Skill level (table: cmn_skill_level) and while I was able to configure that list view to show the main levels, we want to be able to only see the ones under the Technical not the other ones, like Language, etc.

 

terrieb_0-1762543863832.png

 

I don't see a way to create a view that can be saved on this table or filter it out for everyone's use (default)

 

Anyone have a suggestion??

 

18 REPLIES 18

Hi @terrieb , 

Please add a Run Script step after creating the task, 

(function execute(inputs, outputs) {
  // get the sys_id "Technical / Basic"
  var level = new GlideRecord('cmn_skill_level');
  level.addQuery('name', 'Basic'); // add your level
  level.addQuery('type.name', 'Technical');
  level.query();
  if (!level.next()) return;

  // update sc_task.skills (glide_list) by sys_id from Flow
  var task = new GlideRecord('sc_task');
  if (task.get(inputs.task_sys_id)) {    // pass task sys_id to input
    task.skills = level.getUniqueValue(); // one skill for many 'id1,id2'
    task.update();
  }
})(inputs, outputs);


I hope it helps. Please don't forget to mark it as helpful, 

Best regards,
Renat Akhmedov

How do I add a Run Script action in a flow?  I don't see that as an option and I tried adding it to the task using the field of skills but it did not input that info when the task was created?  

Thanks

Hi @terrieb

Please take a look at the YouTube video guide, 

https://www.youtube.com/watch?v=8PThVarMn3o

Also, please make sure that you don't forget to mark my answers as helpful if they have really helped you. Thanks, 

Best regards,
Renat Akhmedov

I love using Flow Designer to get work done and in this video I show you how you can still write your scripts in Flow Designer and make those scripts reusable and shareable for others in your platform that are using Flow Designer. From getting the current date and time to calling a method within a

While this was helpful and I built the Script Action,  and then added it to the flow after the catalog task action, it is still not populating the field on the task form.  This video does not show that step - it shows how to look up records but you can't do that with the catalog task (at least it wouldn't let me select that)

 

So how do I get this new "action" of script to work in the flow???

Here is the Script Action:

 

terrieb_0-1762953674837.png

 

 

Per your previous instructions, here is where I put it in the flow:

 

terrieb_1-1762953736840.png

 

Did I miss a step not shown in the video???

 

Sorry but just try to get this action automated and used across several flows, not just one

 

Thanks!!

This is the field, pointed to that table, that is not populating:

 

terrieb_2-1762953895766.png