Hi Guys,
I have a splunk query which gives me events based on the time frame given. And for some days I may not get any events.
If no events then my workflow fails to upload data to domo.
I want to write a formula or use some filter tool.
Like when there are no events then I should use static input values which is Current date for the date column and count as null.
I have a select tool to pass the output from formula or filter tool.
I'm confused how to use the formula tool, cause it is for only a column based.
And when I use filter, I get two output which is true and false.
But I only want single output to be passed to the filter.
Note: the column names will be same from the splunk event and my static data.
But if I use append tool in between and if there is no fields from the splunk data, the workflow throws an error.
Appreciate any help with this.
Thank you
Résolu ! Accéder à la solution.
use a count records tool. If there are zero - trigger that part of your workflow.
hi @Lalith27
If you want to dynamically change the WF process and output data, one way is using Batch Macro. As @apathetichell wrote, Count Records tool is useful in this case because it always output the exact 1 row x 1column data even when it receives 0 record. (for this reason, Count Record tool is useful to control the end of loop of Iterative macro, FYI)
The attached WF is just an example to show you what I meant to say for reference. Within Batch Macro, depending on the record count of input data, it changes the data process; If record count >=1(data exists), then the upper container is enabled and the lower disabled. If record count=0, upper is disabled, and lower enabled. It always return either of container.
(1)When input data contains at least 1 row
(1)When input data contains no rows (0 record): It outputs the default template as set in text tool in Batch Macro.
Please check the WF as attached.
Thanks very much @gawa @apathetichell! It helped.