Issues with Malformed IF statement
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I am trying to create a new table with conditions , considering all the data is String type and having the current code, how can I fix this error?
Solved! Go to Solution.
- Labels:
- Output
- Run Command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You don’t need any sort of condition after ELSE - you just need the string value at the end. The ELSE statement captures everything that the previous conditions don’t cover.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
… ELSE ‘>2501’ ENDIF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you for the answer, it would look something like this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Yes correct. In addition, I noticed your second condition doesn’t match the same format as the first. Make sure to match it similarly with the THEN part!
if you paste the formula in the thread, I could edit it more easily!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I thank you very much for your assistance, the THEN turned out to be the main issue, but the ending formula does not create the new table properly.
IF IsNumber([Score]) >= 0 AND IsNumber([Score]) <= 1500 THEN "<1500"
ELSEIF
IsNumber([Score]) >= 1501 AND IsNumber([Score]) <= 2500 THEN "1501-2500"
ELSE
">2501"
ENDIF
results in
Wich is not supposed to be the case. Do i still need to put another condition, or am I doing something wrong here?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I would look at your Score values then and adjust the IF statement accordingly!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
That did it, it was the data type in the end. Thank you so much for your help!!!
