Script task output to check if condition

1k Views Asked by At

From the script task I get an output { "resultSetCount": 1, "recordsAffected": 0, "resultSets": [ { "rowCount": 1, "rows": [ { "flag": 1 } ] } ],

how to build an expression to check if the flag is 1

@equals(activity('Script1').output.resultSets.flag,1) This is not working

2

There are 2 best solutions below

0
On BEST ANSWER

Use this expression to get the required output value from script activity output in If Condition.

@equals(activity('Script1').output.resultSets[0]['rows'][0].flag,1)
0
On

@equals(activity('Script1').output.resultSets[0].rows[0].flag,1). May be needed to convert to int if you are setting with to variable and its type is string