I'm currently trying to write a script that reads a column from my data table, and runs a different set of functions depending on the value of that column. For example,
If the data in Column A = A, create a new column called "A" and run the functions (A to C) below.
If the data in Column A = B, create a new column called "B" and run the functions (D to F) below instead.
Else, create a new column called "N/A".
When I run my script, it will always create the new column "N/A" even if the value is "A" or "B". It will also not run any of the functions I have written for the "A" and "B" conditions. I feel like I'm missing something very obvious.
dt = Current Data Table();
If(
:Column A == "A", dt << New Column( "A", character, nominal ),
Function A
Function B
Function C
:Column B == "B", dt << New Column( "B", character, nominal ),
Function D
Function E
Function F
dt << New Column( "N/A", character, nominal )
)