Hi - I am trying to create and populate a group of new columns based on results of an if/then statement.
STEP 1:
I need to create the new empty columns that will be populated. (55 in all)
(Each new column is a numeric, continuous field.)
The name of each column will correspond to the name of each of the 55 compounds in the group followed by "_ppt". E.g. the compound named "4:2 FTS" results in a new column named [4:2 FTS_ppt].
STEP 2:
Row by row, I would populate the new columns using an if/then statement that evaluates three existing columns associated with each of the 55 compounds in the group. Specifically,
if [RES_VALUE_4:2 FTS] >= [RL_4:2 FTS] THEN [4:2 FTS_ppt] = [RES_VALUE_4:2 FTS]
if [RES_VALUE_4:2 FTS] < [RL_4:2 FTS] AND DETECT_FLAG_4:2 FTS] = N AND [RL_4:2 FTS] <= 3 THEN [4:2 FTS_ppt] = 0.0009.
if [RES_VALUE_4:2 FTS] < [RL_4:2 FTS] AND DETECT_FLAG_4:2 FTS] = N AND [RL_4:2 FTS] > 3 THEN [4:2 FTS_ppt] = NULL.
Here are the existing column names with a suffix that is the compound name. I am using JMP Pro 17.0.
![learning_JSL_1-1693949204065.png learning_JSL_1-1693949204065.png](https://community.jmp.com/t5/image/serverpage/image-id/56244i92BD60824805B949/image-size/medium?v=v2&px=400)
![learning_JSL_2-1693949229746.png learning_JSL_2-1693949229746.png](https://community.jmp.com/t5/image/serverpage/image-id/56246i43C293D1C432DC41/image-size/medium?v=v2&px=400)
![learning_JSL_3-1693949262413.png learning_JSL_3-1693949262413.png](https://community.jmp.com/t5/image/serverpage/image-id/56247i231F191594BB6DEC/image-size/medium?v=v2&px=400)
Any guidance would be most appreciated!