Skip to content

Commit fb7bc52

Browse files
Out-of-order return in snippet
This would cause the output message of the step to not be set correctly in the success case
1 parent 5d284c5 commit fb7bc52

File tree

1 file changed

+2
-2
lines changed
  • Specialized Areas/ATF Steps/Count table records

1 file changed

+2
-2
lines changed

Specialized Areas/ATF Steps/Count table records/script.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
var gr = new GlideAggregate('incident');
44
gr.addAggregate('COUNT');
55
gr._query();
6-
if (gr.next()) {
7-
return gr.getAggregate('COUNT'); // pass the step
6+
if (gr.next()) {
87
stepResult.setOutputMessage("Successfully Calculated the Count");
8+
return gr.getAggregate('COUNT'); // pass the step
99
} else {
1010
stepResult.setOutputMessage("Failed to Count");
1111
return false; // fail the step

0 commit comments

Comments
 (0)