create a content block in servicenow using dynamics html with jelly xml script where i can add a name and a number that links to a kb page lets say name: Requesting for additional OneDrive storage space Link: /kb_view.do?sysparm_article=KB0011339 KB number: KB0011339
this will be a big table of kbs
i want to make the add of any new kbs simple for future users
this list will have kbs from multiple owners and teams
all the kbs are under the table kb_knowledge
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
To create a dynamic content block in ServiceNow that displays a table of KB articles with links, and allows for easy addition of new KBs, you can use a combination of Jelly XML, HTML, and JavaScript. Below is a solution that meets your requirements:
Paste the above Jelly XML script into the content block.
Add the Content Block to a Page:
Go to the desired page or catalog item where you want to display the KB table.
Edit the page and add the "Dynamic KB Table" content block.
Simplifying Future Additions:
To make it simple for future users to add new KBs:
Ensure KBs are Added to the kb_knowledge Table:
All new KBs should be created in the kb_knowledge table with the active field set to true.
Automatic Updates:
The script automatically fetches all active KBs from the kb_knowledge table, so any new KB added will appear in the table without needing to modify the content block.
Documentation:
Provide clear documentation or instructions for users to:
Create new KBs in the kb_knowledge table.
Ensure the active field is checked for the KB to appear in the table.
Example Output:
For your example KB:
Name: Requesting for additional OneDrive storage space
KB Number: KB0011339
The table will display:
Name
KB Number
Requesting for additional OneDrive storage space
KB0011339
This solution ensures the table is dynamically updated with all active KBs from the kb_knowledge table, making it easy for future users to add new KBs without modifying the content block.