- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
"If statement" does not work properly when running the whole script but if I only run the part in question it works well
Hi,
I am note very experienced in scripting and have a question (may be I am missing some basic syntax here?).
I use the following script to create in a data table new columns with an "if statement".
For new column "Headache 1" this works well. For "Fever 1" it does not work. New column is created (but with data type numeric and data model continuous instead of character, nominal and if statement does not work) .
Interestingly, if I only run in the script editor the part below it works very well (column then is character, nominal and also the values >=38 are transferred to "Yes" properly.
Reference column "Converted Temperature" in the if"statement" is numeric, continuous.
So what I am doing wrong here?
Thanks for support !
New Column( "Fever 1",
Character,
"Nominal",
Formula( If( :Converted Temperature >= 38, "Yes", "" ) ), Set Selected );
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: "If statement" does not work properly when running the whole script but if I only run the part in question it works well
I am not finding an error.
You may want to check the data table for duplicate column names.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: "If statement" does not work properly when running the whole script but if I only run the part in question it works well
I am not finding an error.
You may want to check the data table for duplicate column names.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: "If statement" does not work properly when running the whole script but if I only run the part in question it works well
Thank you Jim. The issue is resolved. I made a mistake in choosing the wrong data model in a later part of the script and now I am using the debug function (my learning today!) Great support!