RITM variable value is different from Catalog Form input for Non-Admin users

subhadeep1618
Tera Guru

I'm facing a very strange issue.

I've a Catalog Variable that is getting auto-populated through some client-side script + Script Include ajax response combination.

But when a non-admin user is submitting the form, then the RITM variable value is different from the form's variable value.

For admin users, everything is working fine.

Example of the issue (for non-admin users):

In the catalog form, the value is: 

Asset No. = AXY123HU4

But in RITM, the value is showing as:

AXY123HU4


Please mark this post as a solution and also as helpful, if this resolves your issue or query.

Thanks,
Subhadeep Ghosh.
4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

@subhadeep1618 

Did you check the script include is getting called for non-admins or not?

try adding gs.info() and check

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

Yes @Ankur Bawiskar 
Non-Admin users are able to see the auto-populated value, which means the script is getting called.

Screenshot is given below (1st screenshot)

The values shown in red box is fetched by Script Include Ajax response.

But when the same user is seeing the RITM, then this same field is shown like the 2nd screenshot.

Only the asset numbers are shown as comma-separated values.

 

Is there any other script, that is overriding my script? Is this possible?

 

Inside Catalog Form after auto-population of the field:

subhadeep1618_0-1692696322819.png

 

Inside RITM:

subhadeep1618_1-1692696552243.png

 


Please mark this post as a solution and also as helpful, if this resolves your issue or query.

Thanks,
Subhadeep Ghosh.

I think , this is happening becauase of display flag true of related table.

When its catalog form , display_name field must be used under variable attributes of 'Assets assigned to selectec user' variable and display_name is calculated field on the form where as when its RITM then display flag set to true will come into scenario and showing the display field (asset tag in your situation).

This is expected behaviour and OOB behaviour, either you need to stop showing display_name field on catalog form and match it with RITM OR change the display flag true to display_name filed of related table (not recommended as impact will be instance wide).

 

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Regards,Sushant Malsure

sushantmalsure
Mega Sage
Mega Sage

Can you share the screenshot highlighting difference?

I see the same asset number you given in example, isnt it ?

 

 

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Regards,Sushant Malsure