- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2023 03:20 AM - edited 09-06-2023 04:37 AM
Hi Experts,
On the asset_task table,I have one field called action when action is assign> in asset field I need to populate only the assets which are in Instock state, and when the action is return I need to populate the assets which are assigned for the requested for user on task form.So I have tried the below script include and reference qualifier for action== assign ,but it is not working.it is returning only one value.
but for return reference qualifier is working fine
Please help me on this.
Script include:
javascript: if(current.u_action== 'assign') new get_assets().getAssetDetail(); if(current.u_action== 'return')"assigned_to=" + current.requested_for
javascript: if(current.u_action== 'return')"assigned_to=" + current.requested_for;if(current.u_action== 'assign') install_status=6^EQ
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2023 07:47 AM
Hello Chaithanya,
Use below qualifier :
javascript: "install_status=6^stockroom=" + current.getValue('stockroom');
ServiceNow Developer
I know one thing, and that is that I know nothing.
- Socrates
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2023 04:32 AM
Hello @Community Alums
Assuming "asset" field is referencing to "alm_asset" table.
can you please use "configure dictionary " option and set directly simple reference qualifier
If you want to use advance reference qualifier then directly put query
ServiceNow Developer
I know one thing, and that is that I know nothing.
- Socrates
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2023 07:29 AM
Hi @Vishal Birajdar
Thanks for the reply!
and need one more help on the same,
now I need to populate the assets based on the stockroom also, which are all the assets are there in that stockroom where asset state is "in stock"
I have tried below Reference qualifier. but not working
javascript: "install_status=6"^"stockroom=" + current.stockroom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2023 07:47 AM
Hello Chaithanya,
Use below qualifier :
javascript: "install_status=6^stockroom=" + current.getValue('stockroom');
ServiceNow Developer
I know one thing, and that is that I know nothing.
- Socrates