I have three activities (A, B, C) that need to return a string = ‘True’ in order for the If block to run its True activities, otherwise False activities.
Scenario 1 (All True):
A = True
B = True -> if A & B & C = True then True
C = True
Scenario 2 (At least one False):
True
False -> if A & B & C != True then False
True
I have tried to simplify the expression to this;
@and(
equals('True',
'True'), # True = True, True
and(
equals('True',
'True'), # True = True, True
equals('True',
'True') # True = True, True
) # True & True, True
# True & True, return True
)
However, this throws an error:
The function 'bool' was invoked with a parameter that is not valid. The value cannot be converted to the target type
How can I go about evaluating all three (3) conditions?
I have also tried using another and() such that it becomes this to no avail (same error msg):
@and(
and(
equals('True',
'True'),
true
),
and(
equals('True',
'True'),
equals('True',
'True')
)
)
2
Answers
This seems to be one way of solving it.
True Condition
@and(equals(Activity A),’True’),equals(Activity B),’True’))-Set a variable Z =true
@and(equals(Activity Z),’True’),equals(Activity C),’True’))-Set a variable result =true
False Condition
@or(equals(Activity A),’False’),equals(Activity B),’False’))-Set a variable Z =False
@or(equals(Activity Z),’False’),equals(Activity C),’False’))-Set a variable result =False