Add tables with rows and columns in the catalog item

taqdeer
Tera Contributor

Hi All,

is it possible to create a table with rows and columns in the catalog item. I want to display the information to the users in the form of table in the catalog item. Below is the reference.

 

Based on the information below, please answer the next questions. 

 Abc
 def
ghi

 

 

 jkl
mno
pqr


Could any one please help me with this. 

1 ACCEPTED SOLUTION

Hi,

something like this

1) you can add your Own HTML table and add style etc

2) Widget

HTML:

<div>
<!-- your widget template -->
  <head>
		<style>
			table {
			font-family: arial, sans-serif;
			border-collapse: collapse;
			width: 100%;
			}

			td, th {
			border: 1px solid #dddddd;
			text-align: left;
			padding: 8px;
			}

			tr:nth-child(even) {
			background-color: #dddddd;
			}
		</style>
	</head>
	<body>

		<h2>HTML Table</h2>

		<table>
			<tr>
				<th>Company</th>
				<th>Contact</th>
				<th>Country</th>
			</tr>
			<tr>
				<td>Alfreds Futterkiste</td>
				<td>Maria Anders</td>
				<td>Germany</td>
			</tr>
			<tr>
				<td>Centro comercial Moctezuma</td>
				<td>Francisco Chang</td>
				<td>Mexico</td>
			</tr>
			<tr>
				<td>Ernst Handel</td>
				<td>Roland Mendel</td>
				<td>Austria</td>
			</tr>
		</table>
	</body>
</div>

Variable:

find_real_file.png

Output:

find_real_file.png

Regards
Ankur

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

View solution in original post

14 REPLIES 14

ajayr
Giga Expert

Hi Taqdeer,

 

Yes it is possible. You can use MultiRow Varaiable set for this kind of requirement.

More details you can find here:

https://docs.servicenow.com/bundle/newyork-it-service-management/page/product/service-catalog-management/concept/c_ServiceCatalogVariableSets.html 

 

Please mark correct if this helps.

Thanks

taqdeer
Tera Contributor

Hi Ajay,

Thanks for the response.

But we dont want to capture the data in the table format. We want to display our information to the users in the table format in the middle of the catalog. is it possible? like below

find_real_file.png

Ankur Bawiskar
Tera Patron
Tera Patron

@taqdeer 

If the table information is static and won't change then you can use this approach

1) Create UI Macro and include the HTML table

2) Create Widget and use the HTML table inside it

3) Create Macro type of variable and link the above UI macro in the Macro field and use the widget in the widget field

Now users can see the HTML table data once catalog item loads both in native and portal view

Regards
Ankur

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

Hi Ankur,

Yes, it is a static. it never be changed. It just displays the information what we are supposed to convey to the users.

Could you please help me in creating UI Macros and add 3x3 two tables. 

 

I want to display as below. 

find_real_file.png

right next to the last variable in the above image, tables should get displayed like below.

find_real_file.png