Hello everyone,
I got a workflow with a lot of 'Do If's.
For example in the package attached, the macro should only be executed when the filter returns records.
If it's blank, then it should just not execute that flow.
After reading similar questions, I figured out that I probably needed the 'conditional runner' macro.
So I downloaded the pack and changed my flow to the below, but now I don't know how to add my 'run only if' statement, and the data is not what i expect.
I feel silly because when others get linked to this macro they say 'works great, thanks!', but I can't find any documentation on how to implement this?
Thanks in advance,
Mikis
Solved! Go to Solution.
The conditional runner is being set to run if NO errors are encountered. Right?
I'd go about this a different way. When the path below it is done, Get a COUNT RECORDS. 0 = Don't run and 1+ = Run. Now APPEND that count to the data flowing down into the macro. But before you go into the macro put a FILTER where Count > 0. If you want, you can also put a SELECT before the macro to remove the COUNT field.
This will not only prevent the macro from getting data when it isn't needed, but will also make sure that the lower logic is complete first.
Cheers,
Mark
Thanks for your reply. I gave it a try (cf below and attached), but my macro assumes there are records to work with.
I can probably tweak the macro so it would be able to handle 0 records, but I was hopping to really skip the step altogether (which looks cleaner to me).
You can think of that macro as an 'error handler'. If the error occurs then follow that flow, otherwise follow the normal flow.
If it doesn't occur, then obviously don't run it. Running it with 0 records sounds like a workaround to me, right?
There isn't a "clean" programmatic detour. When this condition of data is met, then run this macro. Where you require data to go into the macro, you can create a text input file with a single record. UNION that data from the SELECT prior to the macro. Set it to be the FIRST record read. After your macro, SAMPLE and skip the first record.
Sorry for the work around, but it should work for you.
Cheers,
Mark
ok it works, thanks for your help!
I must say though that I still feel a little unsatisfied. In pretty much all the programs that I've used before it was possible to say in one way or another
if [something happens] then
[trigger procedure]
end if
I was really hoping that that conditional runner was the solution.
regards,
Mikis
I was looking for a conditional runner, is this the final version?
Is it Possible to run an App using a conditional runner?
I have developed a workflow wherein it should run a yxwz application and show up some interface requesting the user for some details. Currently the workflow is running which triggers the application through conditional runner but it doesn't display the interface asking for the details. Can someone one please suggest a solution for this.
I have a similar problem. Can I pass variables from the outer workflow into the workflow within a runner/conditional runner?