Auto populate the current users laptop in a catalog item

Moedeb
Tera Guru

I have a reference field on alm_asset and I just want to show in that field (on load) the current users assigned laptop.

So for us laptops all have a model category of 'Computer', so I'd tried to set the default value of the field as follows:

Variable name: vs_laptop_asset_number

Table: alm_asset

Asset model category 'Computer' sys_id: 81feb9c137101000deeabfc8bcbe5dc4

Asset assigned user field name: owned_by

 

Default value:

javascript:model_category=81feb9c137101000deeabfc8bcbe5dc4^owned_by=gs.getUserID();

 

This obviously has not worked as I'm asking all of you for some help please

1 ACCEPTED SOLUTION

@Moedeb 

 

In that case, you can may be populate the asset owned as per the asset table in one variable which could be read only and have a confirmation checkbox stating "Does the above listed asset does not belongs to you ?". If the user response is yes, you can have a variable for them to select the asset.

 

Let me know your thoughts on this and we can further work it towards closure.


Please mark this response as correct and helpful if it assisted you with your question.

View solution in original post

24 REPLIES 24

Hi @Amit Verma I understand the concept of what you have put forward, however we have occasions where the assigned asset is not always the one the person actually has, therefore we want to present the one they actually have in order for them to either confirm or update us on what laptop they actually have.

@Moedeb 

 

In that case, you can may be populate the asset owned as per the asset table in one variable which could be read only and have a confirmation checkbox stating "Does the above listed asset does not belongs to you ?". If the user response is yes, you can have a variable for them to select the asset.

 

Let me know your thoughts on this and we can further work it towards closure.


Please mark this response as correct and helpful if it assisted you with your question.

@Amit Verma it may well be heading that way currently.

With that option I could also assign a task to the Service Desk to update the asset records to improve their accuracy.

@Moedeb 

 

A challenge I could foresee with this approach is when a user has multiple assets tagged to him or her. Could you please confirm whether the users will have only a single asset allocated to them ?


Please mark this response as correct and helpful if it assisted you with your question.

Yes just the one laptop - other assets yes, but I am filtering the reference field to only display laptops, so not an issue.