ATF validate prb # is referenced in the inc notes (ATF validate a dynamic number in a field)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2024 09:41 AM - edited 08-29-2024 07:26 AM
I created an INC with a related Problem record. Once I closed the PRB and the INC the resolution notes auto populate as shown
How can I create a validation the PRB# is in the resolution notes since it is dynamic?
I tried a field value validation -

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2024 10:50 AM
Hi @Ashley45 ,
1)Create a custom step to fetch the problem number on the incident
2)Compare using Form field validation
To create custom step
1)go to Automated test framework >Step configuration
2)name the step and define input and output variables
ex:
Inputs
Output
Add this script in the step execution script
Now add to your ATF step
Result:
Hope this helps!!!
Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2024 12:09 PM
@Hemanth M1 For the Problem Number test step what is your input for the ID? are you using the data from the opening problem record?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2024 11:46 PM
Hi @Ashley45 ,
1)Open a created record (incident created) if can't do record query
2)Input to the Problem records are table and sys_id of the incident
How to map them in ATF step
Input:
Output:
Output variable is count, you can rename it anything.
Hope this helps!!!
Thank you,
Hemanth
Certified Technical Architect (CTA), ServiceNow MVP 2024, 2025
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2024 12:44 PM
@Hemanth M1 Also i cannot do a record query on this test. This test creates and INC then creates a problem in relation to the INC. It's always going to be a new number, same issue that i'm having with the PRB #