"If" condition in Flow Designer is evaluating as false every time. even though, it has to evaluate true. In Action it is returning "True" but in flow designer it is always returning "False" even the condition met

S_75
Giga Expert

I have a requirement to create a task if date field is empty. I have created an custom Action and it is returning true when date is empty which is correct but, when I called the same Action in the flow it is always returning false value which has to return true if Date value is Empty. How to get return value as "true" if date is empty and "false" if date field has some date.

Action Input Type is "Date"

Output variables Type: "True/False"

Action Output:-- 

find_real_file.png


Action script:--

find_real_file.png

Please help me out on this. Appreciated in advance. 

1 ACCEPTED SOLUTION

Can it be that the date retrieved from the record is null or undefined?

Add a check in Script.

(function execute(inputs, outputs) {
if (inputs.employment_start_date == null || inputs.employment_start_date == undefined inputs.employment_start_date == '') {
    outputs.truefalse = true;
} else {
    outputs.truefalse = false;
}
})(inputs, outputs);

View solution in original post

17 REPLIES 17

Harish KM
Kilo Patron
Kilo Patron

Cant view the image. Can you attach it?

Regards
Harish

sorry, now you can view it

S_75
Giga Expert

find_real_file.png

In Flow design it is getting like this

In your script step you need to pass the input parameter like below. I dont see one in your script action

Regards
Harish