Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

Display dynamic asset data (alm_asset) in ESC portal carousel per logged in user

singhpragati
Kilo Contributor

I have a requirement to add a dynamic 5th slide in the ESC Portal Carousel. I need guidance on whether this is achievable and how to implement it.

 

CURRENT SETUP:
Our ESC Portal Carousel already has 4 static slides which are Announcement type records working perfectly.

NEW REQUIREMENT:
We need to add a 5th slide in the same carousel which should be dynamic - fetching data from the alm_asset table based on the logged-in user. Specifically:
 Check if the logged-in user has a Smart Phone assigned in alm_asset table
If the smart phone is retiring within the next 30 days, show a slide with:
* Asset Tag
* Model Name
* Retirement Date
* Number of days remaining
* A link to raise a new asset request(Catalog item)
- If no smart phone is retiring soon, this 5th slide should NOT appear
- Each user should see their own smart phone details (user-specific dynamic data)

 

CURRENT UNDERSTANDING:
The standard ESC Portal Carousel uses static Announcement records and supports basic user variables like ${user.first_name}. However, it does not seem to support dynamic database queries from tables like alm_asset.

We have already implemented this successfully as a separate Service Portal widget using gs.getUser().getID() in the server script to query alm_asset. But the requirement is specifically to show this as a slide within the existing Carousel.

 

 

QUESTIONS:
1. Is it possible to add a dynamic 5th slide in the existing ESC Portal Carousel that fetches data from alm_asset per logged-in user?
2. If yes, what is the recommended approach?
3. Is there any way to conditionally show/hide a carousel slide based on asset data?

 

Instance: ServiceNow ESC Portal
Table: alm_asset
Field: retired (retirement date)
Carousel: Currently has 4 static announcement slides

 

 

Any guidance or examples would be greatly appreciated!

Thank you!

0 REPLIES 0