- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-08-2020 02:34 PM
I am trying to use Assert Text on Page (Custom UI) in ATF to check the text on the message that is output once I have created a security incident from an incident. Is there anyway I can use wildcards in the text search, because currently I have to stop my check at the first number. i.e.
The output message is
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-09-2020 01:12 PM
I was able to fix this by writing a client script to grab next number to be used from sys_number_counter and then pasting that value into the text field so I could check the complete string.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-09-2020 01:12 PM
I was able to fix this by writing a client script to grab next number to be used from sys_number_counter and then pasting that value into the text field so I could check the complete string.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-23-2020 04:10 AM
Great leon.
could u pls share the script?
Thanks and regards,
Ramakrishna
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-28-2020 06:39 AM
Good work leon,
can you pls share the script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-24-2020 02:42 PM
Apologies for the delay, here is the sample code.
// table name and timeout are input parameters, it outputs the number.
var urecord = inputs.u_table_for_next_no.toString();
if (urecord != null && urecord != '') {
var query = new GlideRecord('sys_number_counter');
var equery = 'table=' + urecord;
var counter = 0;
var noLen = 0;
while (counter <= timeout) {
query.setLimit(1);
query.initialize();
query.addEncodedQuery(equery);
query.query();
if (query.next()) {
var newno = (query.number + 1);
noLen = 7;
outputs.u_next_number = zeroPadding(newno, noLen);
}
counter++;
gs.sleep(1000);
}
}
}
function zeroPadding(number,length)
{
return (Array(length).join('0') + number).slice(-length);
}