Print query results to field

shembop
Tera Contributor

        So, I am looking to get a list of all CI's associated to a user and print it into a task field. Maybe the Description field, Maybe Work Notes. I have not decided.

What would be the easiest way to do that? The goal is to provide a list of machines without making the person go hunt through a related list. I could print out the task and tell a person to go forth and conquer.

7 REPLIES 7

sachin_namjoshi
Kilo Patron
Kilo Patron

You can create UI page and populate table in this UI page to display asset assigned to current users.


You can open UI page with UI macro and refer UI macro in field.



OR



you can create client script and do Glideajax to populate description with asset assigned to current user.



Regards,


Sachin


To be more clear, here is what I am doing. In the workflow, I say via a query, - Does the person have any computers associated to him? If yes, create a task to retrieve them (This is part of our "exit" workflow) What I then want to do is to populate a field on the task that lists out the computers. Possibly getting more clever and only showing active ones.


Are you creating task using run script activity in workflow?


if yes, you can populate description of task with computer assigned to users in run script.


Also, you can define new run script activity to populate description after task is created by workflow.



Regards,


Sachin


Nate23
Mega Guru

you could just make a relationship and show it on tasks... that way its always there and never have to actually print it to a field... not sure your exact requirements but this would be my approach.



Creating Defined Related Lists - ServiceNow Wiki