How to count number of "true" and "False" and update the count in report as True- , False -

Hi All,
I have a requirement where I need to validate each row so I am using Do While activity and looping each row and I am validating whether it is true or false ,But I need output based on count as eg " True -13,False-13 ".

Kindly suggest any idea how to count “True” and “False”

fine in that case we can use expression like this in a assign activity

int_value = IF(yourcondition,“13”,“14”)
so if the condition passes that is if true it will give 13 as value to int_value variable or gives 14 if false

where int_value is a variable of type int32 defined in the variable panel

Cheers @mnawazud

Hi Palaniyappan,

The above mentioned is not the case I am looking for,
Suppose if there are 60 rows and I am looping all rows one by one for validating whether all rows are True or False and after the loop if there are True -15 and False - 45.

Then I need to update output as True - 15 and False- 45.So I need a logic how to count all True and False condition.

1 Like

got it
so within the IF CONDITION in THEN part use a assign activity like this
int_truecount = int_truecount + 1
where int_truecount is a variable of type int32 with default value as 0 defined in the variable panel
so if the condition mention passes it will get into THEN part where this will get incremented

similarly for ELSE PART use a assign activity like this
int_falsecount = int_falsecount + 1
where int_falsecount is a variable of type int32 with default value as 0 defined in the variable panel
so if the condition mention fails it will get into ELSE part where this will get incremented

atlast outside the loop the variables int_truecount and int_falsecount will hold the count values

here you go with a xaml @mnawazud
truefalse.zip (9.5 KB)

kindly try this and let know for any queries or clarification
Cheers @mnawazud

hii mnawazud,

use this solution for expected output.
countTrueFalse.xaml (11.8 KB)

1 Like