Rule-based Row Splitter - Handling conditional columns from HTTP Request

Hi,

I have a workflow that executes a GET Request for multiple rows.
After execution the node adds a column “status” to the table.
Based on the “status” I split the records between successfully and not successfully processed rows.

The issue is, that when the table is empty, the request node does not append the “status” column and the rule-based Row Splitter fails and stops the workflow. What is bad in the overall context. The output should just be empty.

This is how it looks like, if the table is empty:
image

This is how it looks like for a not empty request, if I define the “status” column up-front:

Can anyone tell me how to get this fixed?

Hello @NicerDicer,

if I got you right after GET Request node you should use Empty Table Switch node which will activate first output port in case of non-empty table and second output port in case of empty table.

Br,
Ivan

1 Like

Hi @ipazin,

I already tried that too, but the problem is, that both branches must stay active, as I write the row count into an CSV file in the next step.

Hello @NicerDicer,

but if table is empty then what count are you writing? Zero? Maybe I don’t fully get it. Is problem when you get empty table after Get Request node or problem is when you don’t get status column in non-empty table or both? Is your goal to always have status column after prior to Rule-based Row Splitter regardless of empty/non-empty table?

Br,
Ivan

Hi @ipazin,

i am writing nothin in that case. But I have a chain of cobined steps and if I set one stept to inactive, all the following steps will be inactive too.
image

Maybe a try catch can help?

Hello @NicerDicer,

having Empty Switch Table node in workflow doesn’t mean you end flow in case there is empty table. You can “simply” design your flow in a way to continue by connecting second output port to nodes which need to run after it. For example End IF can be used. However I don’t know your flow so it might not be this simple as shown in picture:

SwitchEndIF

Br,
Ivan

3 Likes

@ipazin Thanks.That works perfectly.
I never had the idea to use the end if node before.

image

2 Likes

Hello @NicerDicer,

glad to hear that :+1:

Br,
Ivan

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.