dt<< New Column( "op status", Character, "Nominal", Set Selected );
If( Is Missing( Column( dt, "Status Operation" )[x],Word( 1, "PCNF" ) | Word( 1, "CNF" ) ),
Column(dt, "op status") == "Q"
);
Hello everyone, I would like to create a new column and in this column, if the words PCNF or CNF do not appear in the column :Status Operation, on this line, put "Q" in the Column :op status but I do not know the syntax. I thank you for your help.
Here's a column formula that will work:
dt << New Column( "op status", Character, "Nominal",
Formula(
If(
!Contains( :Status Operation, "PCNF" ) &
!Contains( :Status Operation, "CNF" ),
"Q"
)
)
);
Using a formula (or << Set Each Value) is easiest option. What type of formula to use depends on what sort of values your Status Operation has. Could you provide couple of example values from that column?
Here's a column formula that will work:
dt << New Column( "op status", Character, "Nominal",
Formula(
If(
!Contains( :Status Operation, "PCNF" ) &
!Contains( :Status Operation, "CNF" ),
"Q"
)
)
);
Try this
dt << New Column( "op status",
Character,
"Nominal",
Set Selected,
formula(
If(
Is Missing( :Status Operation ) | (Contains( :Status Operation, "PCNF" ) == 0 &
Contains( :Status Operation, "CNF" ) == 0),
"Q",
:Status Operation
)
)
);