- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2022 07:56 AM
I am using Multi Row Variable Set to get multiple users and need to populate the Row variable based on the number of being entered in the variable set.
I need a way to get the count of records current present in Variable Set to set the Row variable.
For example : I already have an user selected in MRVS and when I click add again i need to get the row count so I can populate the Row field+1 of that.
Thanks
Solved! Go to Solution.
- Labels:
-
Service Level Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2022 07:59 AM
Hi,
you can observe whether it's add/removal
OR
you can use onLoad catalog client script and get the value of MRVS and get the count
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2022 07:59 AM
Hi,
you can observe whether it's add/removal
OR
you can use onLoad catalog client script and get the value of MRVS and get the count
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-21-2022 11:05 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-14-2023 10:35 PM
I've come up with a solution for getting the row count of entries in a multirow variable set that may help in some cases. I created a widget that is then embedded in a catalog item that has a MRVS. The widget creates a button that opens a popup with the row count. Pretty simple setup and very handy in my case.
Steps:
- create a new widget with the following script:
HTML:
<div>
<button class="button-text" ng-click="c.getCount()">${Get Row Count}</button>
</div>
<!--popup modal 1-->
<script type="text/ng-template" id="modalTemplate4">
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-body wrapper-xl">Total Rows is {{c.data.count}}</h4>
</div>
<div class="panel-footer text-right">
<button class="btn btn-primary" ng-click="c.closeModal()">${Close Popup}</button>
</div>
</div>
</script>
CLIENT SCRIPT: