Sending the list of available assets for selected location

Suhail2297
Tera Contributor

Hello team,

I had an requirement - 

I have a service catalg by name centre closure , when the user selectes the centre number and submits the request then a ritm is generated,  once the ritm is closed then change requested will be created where we have 2 change tasks and now i had to add one more task which is compelted.

In the new task when we add email address in the description variable then we need to send an email to the address that has been added in description with the list of assets belongs to this centre number selected on the catalog item.

For this i had modified in the flow designer by adding a variable here and look up hardware records and 

/*
**Access Flow/Action data using the fd_data object. Script must return a value.
**Order number is offset by +1 in Error Handling Section.
**Available options display upon pressing "." after fd_data
**example: var shortDesc = fd_data.trigger.current.short_description;
**return shortDesc;
*/
var asset = fd_data.flow_var.variable + '\n';
 
var gr = "Display Name: " + fd_data._17__for_each.item.display_name +
    " | Serial Number: " + fd_data._17__for_each.item.serial_number +
" | Location: " + fd_data._17__for_each.item.location.name +
    " | Centre Number: " + fd_data._17__for_each.item.location.u_centre_number +
    " | State: " + fd_data._17__for_each.item.install_status +
    " | Substate: " + fd_data._17__for_each.item.substatus;
 
return asset + gr;
Suhail2297_0-1754892990855.png

 

Im getting the data but not in table format,
can you please help me in getting the data In table format ?
2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

@Suhail2297 

seems you are setting short description and directly picking it in email

short description being string field won't show data in tabular format.

You will have to use email script for showing tabular data.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Can you please guide me with the script?

Thankyou