Remaining text does not appear to be part of the formula

i am getting that error for this formula:

{Command.ORDER_ID} = {?OrderID}

if {?LineNo} = ''
then {Command.Line_no} like '%'
else {Command.Line_no} = {?LineNo}

what i am trying to do is to avoid the report breaking when the parameter line no is not entered by using a wild card as its value.

order id is always required.
metropiaAsked:
Who is Participating?
 
mlmccCommented:
Try this

{Command.ORDER_ID} = {?OrderID}
AND
if {?LineNo} = ''
then {Command.Line_no} like '%'
else {Command.Line_no} = {?LineNo}

mlmcc

0
 
metropiaAuthor Commented:
Thank you.

that took away the error, but left me with a new one.
LineNo is a numeric field/ column. The formula is complining about this line: if {?LineNo} = ''

"A number is required here"

0
 
metropiaAuthor Commented:
i changed it to:

if {?LineNo} <= 0

and now it complains about the following line: then {Command.Line_no} like '%'

"a string is required here"

shoot!

0
 
metropiaAuthor Commented:
how can a wildcard be used for a numeric correctly?
0
 
mlmccCommented:
You can't use a wildcard with a number data type.  If it is a string that happens to be a number then it will work

{Command.ORDER_ID} = {?OrderID}
AND
if {?LineNo} < 0 then
    True
else
    {Command.Line_no} = {?LineNo}

mlmcc


0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.