cancel
Showing results for 
Search instead for 
Did you mean: 

if formula

Former Member
0 Kudos

Hi Experts,

I have below requirement wherein I want to discount % only if its less than 100 else word 'foc' should be printed, I tried below

if {Command.DiscPrcnt}= 100 then 'FOC'

else {Command.DiscPrcnt}

it gives message string is required.

Can you advise how to get number and text results in same if statement.

Thansk

Deepak

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Deepak,

You can't! You'll need to convert the number to string. Try this:

if {Command.DiscPrcnt} < 100 then ToText({Command.DiscPrcnt})

else

'FOC'

-Abhilash

Former Member
0 Kudos

Hi Abhilash,

Thanks for instant reply, I tried above but it returns on 'FOC'  and Discount less than 100 is shown blank.

Please advise.

Thanks

Deepak

Former Member
0 Kudos

Hi Abhilash,

Thanks it worked now.

Thanks

Deepak

abhilash_kumar
Active Contributor
0 Kudos

Could you post a screenshot of the Preview Mode with both the {Command.DiscPrcnt} field and the formula field placed beside each other?

-Abhilash

Answers (0)