Auto Poupulate the asset assigned to the user
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2024 01:04 AM
Hi,
I have the catalog form where there are 2 reference fields.
1. user_to_be_released - reference of sys_user table
2. computer_name - reference of alm_hardware table
Now i need to auto populate the asset assigned to the user( "user_to_be_release field") in computer_name field and below are the CS and script include which i have written. But i didnt get any values returned in computer_name field.
Can you please help me with this and is there any reference qualifier needs to added in computer_name field? Please give your suggestions, since i am new to scripting.
Client Script - written on computer_name and type is onChange
Script Include - client callable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2024 02:18 AM
Hi @Aruna13,
Please please change the variable name on client script as user field then it will work because you are changing the user name in field and variable name field is variable name itself.
Please accept my solution if it works for you and thumps up.
Thanks
Jitendra
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2024 02:26 AM
@Jitendra Diwak1 sorry, I am not getting your correction here. Can you explain me which line of code i have to change and what to change. Apologies for multiple questions, since i am new to scripting.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2024 02:40 AM
Hi @Aruna13,
Please change variable as USER as per the below screenshot:
Please accept my solution if it works for you and thumps up.
Thansks
Jitendra
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2024 03:27 AM - edited 05-30-2024 03:31 AM
@Jitendra Diwak1 @Ankur Bawiskar
I just found that there is another Catalog client script written for the "user_to_be_released" which is auto populating other fields like email, manager(these are catalog variables)
etc. When i change the variable name in my Client Script to "user_to_be_released", the other fields are not populating as expected. What could be the issue here? Cant we have two catalog client script written for one variable?
if it has to be only one, then how should i put it?
existing CS:
can you please check and let me know what is the issue here and guide me