- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2022 03:34 AM
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:--
Action script:--
Please help me out on this. Appreciated in advance.
Solved! Go to Solution.
- Labels:
-
flow designer

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2022 06:09 AM
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);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2022 03:51 AM
image is not opening

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2022 04:06 AM
I have attached it
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2022 05:25 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2022 04:47 AM
Hi,
Created the following Action and Flow.
1.Action
Define Action input "employment_start_date" of type Date
Set Input of Script step to be Action input variable "employment_start_date"
Set Output to be of type True/False
Set Output of Action to be variable "truefalse" from step output
2. Create following Flow to test Action. Set employment_start_date to empty.
Log output from Action
Execution results in "true"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2022 05:16 AM