BusinessObjects Board

Formula that cannot say =?

Hi,

I have a unique problem. I have a formula like this: =If [Note Pmt Sched Payment Plan Nbr] =“003” Then “Yes” Else “No”

This throws an error. After troubleshooting, I sort of see why, but I don’t know how to fix. The problem is that the object returns a value of 003 if I just put the [Note Pmt Sched Payment Plan Nbr] in the report; however, if I modify my formula to say: =If [Note Pmt Sched Payment Plan Nbr] > “002” Then “Yes” Else “No”, then it does return a value of “Yes” like I would expect.

The issue seems to be that I cannot say =, but I can say < or >. I don’t know if this is a formatting issue or what, but it’s super annoying because my original is just a sample to show you for troubleshooting, what I really need to do is use InList and put a bunch of specific values in there. But that won’t work until I can figure out this strange issue.

Is there any way to solve this?

Thanks,

I think your problem is a data type inconsistency.
[Note Pmt Sched Payment Plan Nbr] appears to be a numeric format while you are trying to compare it to a string format.

Try this formula:
=If [Note Pmt Sched Payment Plan Nbr] =003 Then “Yes” Else “No”

If that doesn’t work, try converting [Note Pmt Sched Payment Plan Nbr] to a string format and then do the evaluation.
I’m doing this from memory so don’t fault me if the formula is wrong:
=If ToString([Note Pmt Sched Payment Plan Nbr]) =“003” Then “Yes” Else “No”

1 Like

@JohnBClark

Thank you for your tip, I was able to get a solution from your suggested answer. The correct version of the formula I needed was: =If ToNumber([Note Pmt Sched Payment Plan Nbr]) = 3 Then “Yes” Else “No”

Thank you very much!

1 Like

@JohnBClark

Actually, one last question on this. I need to actually make my formula something like:

=If InList ToNumber([Note Pmt Sched Payment Plan Nbr]) = 3 Then “Yes” Else “No”

But Webi does not like having the ToNumber after the InList. Any ideas there?

I’m not sure what you would be using the InList for. It doesn’t really make sense with the rest of your forumla.
Does [Note Pmt Sched Payment Plan Nbr] contain a list of numbers instead of just one number?

It might make sense with a formula such as this:
=If ToNumber([Note Pmt Sched Payment Plan Nbr]) InList (3,4,5) Then “Yes” Else “No”

3 Likes

@JohnBClark

Bingo! That did the trick. Thank you very much!