
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2022 11:51 AM
Hi,
We have a requirement to allow application CI from cmdb_ci to be selected by user in MS Teams. Please find below the VA coding to return the CI record. we found that if we have gr.setLimit over 128, the virtual agent conversation in Teams will be stopped without any prompt.
Is there a way to bypass the limit or is there any good way for user to select from a long list of CI (data)?
=================================
Below is my coding
Solved! Go to Solution.
- Labels:
-
Virtual Agent
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2022 12:49 PM
According to the docs, the limit for a reference type variable is actually 80
Note: Reference type variable that corresponds to a table that has more than 80 records are not supported.
I would open a case with support to see what they say.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2022 12:49 PM
According to the docs, the limit for a reference type variable is actually 80
Note: Reference type variable that corresponds to a table that has more than 80 records are not supported.
I would open a case with support to see what they say.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2023 03:10 PM
Hi Wai, we ran into a similar issue as well.
Our workaround is creating a search option for our customers to reduce the list size initially and then add pagination to the list by using a similar solution as per below:
(function execute() {
/*
1. Query the requested items table and get all the active items requested_for the user
2. Show the recently updated 5(limit) requested items, apply pagination if there are more than 5.
*/
//Index of first result to show.
var index = parseInt(vaVars.index);
//How many options to show.
var limit = parseInt(vaVars.limit);
var count = 0;
var options = [];
var gr = new GlideRecord(vaVars.table_name);
gr.addActiveQuery();
gr.addQuery('caller_id', vaInputs.user);
gr.orderByDesc('sys_updated_on');
gr.chooseWindow(index, index + limit, true);
gr.query();
count = gr.getRowCount();
vaVars.count = count;
var cnt = 0;
while(gr.next()) {
if (gr.canRead()) {
options.push({ 'value': gr.getUniqueValue(), 'label': gr.getDisplayValue('short_description') + ' [' + gr.getValue('number') + ']'});
cnt++;
}
}
//Append pagination option if there are more records to show
if ( index > 0 && cnt > 0 )
options.push({ 'value': 'prev', 'label': gs.getMessage('Show previous')});
if ( count > index + limit )
options.push({ 'value': 'more', 'label': gs.getMessage('Show more')});
return options;
})()