{if size(OBSNOW("ITFORMUBX31"))>=7 and size(OBSNOW("ITFORMUBX31"))<=12 then CFMT(OBSNOW("ITFORMUBX31"),"","","B","\t\t") else "" endif}
So the above works if the number is greater than 7 but if it's exactly 7 it doesn't work. Is my code wrong or what am I overlooking?
I've had trouble with this before. I've just begun, for example using >6 <13.
If you are comparing numeric results, you need to convert the OBS term to a number first.
Try: if (val(OBSNOW(“ITFORMUBX31″))>=7 AND val(OBSNOW(“ITFORMUBX31″))<=12) then ...
Sorry, I should clarify, I'm counting the number of characters in the text box..
LOL. Understood. I think Adam has the best response. It appears you are trying to format the text so that appears pretty in the note. I would just change your numbers accordingly and use >6 and <13 as suggested since the SIZE function will always return a whole number. Something else to keep in mind if you haven't already thought of it; use a fixed point font like Courier for the text translation or your results may vary.
You might want to try to string the value the obsterm returns to force the 'refresh':
size(str(OBSNOW("ITFORMUBX31")))
When working with obs functions, it can behave oddly...