- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2020 11:55 AM
This is what I have done so far.
1. Created widget called My Assets.
2. Here is my html code:
HTML:
<h4 class="panel-title">
My Assets
</h4>
<div>
<table>
<tr ng-repeat="asset in data.assets">
<td><a href ="nav_to.do?uri=alm_hardware.do?sys_id={{asset.sysid}}">{{asset.display}}"
</a></td>
</tr>
</table>
</div>
Server Script
(function() {
data.userID = gs.getUserID();
data.assets = [];
var gr = new GlideRecordSecure('alm_asset');
gr.addQuery('assigned_to',gs.getUserID());
gr.query();
data.recordCount=gr.getRowCount();
data.assets = [];
while (gr.next()) {
var asset = {};
asset.display = gr.display_name + '';
asset.assigned_to = gr.assigned_to.getDisplayValue();
asset.sysid = gr.sys_id + '';
data.assets.push(asset);
}
})();
3. I went to SP and added the My Assets but nothing shows up that's assigned to me.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2020 02:21 PM
Attached XML (Widget: assets) as well for reference. In addition, make sure the the server side code is sufficed i.e. atleast an asset or two is assigned to your profile.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2020 04:54 AM
Use below in the script.
//link.href='?id=index';
link.href = '?id=my_bv_assets&table=alm_asset&view=asset_portal&sys_id=' + query;
items.push(link);
Also, I guess you using my_bv_assets as page. So, above should work.
In addition, ensure that you add the widget: getassetss to the page my_bv_assets.
You can do that by opening the page & looking for related link.
Then add the widget getassetss.
Note: getassetss is widget name while page you are using is my_bv_assets.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2020 05:13 AM
Jaspal,
Thank you so much for your help on this. I truly appreciated all the work you put in to help me out.
Thanks,
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2020 05:14 AM
I do have one more question. Is it possible that when you click on your computer asset that it takes you to the CMDB ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2020 05:17 AM
Did above work?
By, Is it possible that when you click on your computer asset that it takes you to the CMDB ?
Do you mean backend table?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2020 05:25 AM