Check if Column Exists in Column Expressions Node

Hello,

I have a column that exists within some files and not in others. Thus, when running a loop through reading all the files, it does not always appear.

I am running into a problem with the Column expressions node that it throws an error because the column I am wanting to use (if it exists) does not exist.

Essentially, I want to write an expression that says: If the column(“column1”) exists, then do something, else, do something different

I have tried something along the lines of with no luck:
if (column(“Column1”) = TRUE()) {
column(“Column1”)+column(“Column2”)+column(“Column3”)
} else {
column(“Column2”)+column(Column3")
}

@alyholland maybe you can take a look at this example:

1 Like

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