IF statemnet and equal sign (=)

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

• IF statemnet and equal sign (=)

If I write an IF statement in Palo I can't use an equal sign (=) in the logical test part of the statemnt only the following characters:

!=
>
<
<>
><

Rule:
['menny_pal','varhato'] = N:if(value(right(palo.data("varga_sales","PREMISSZA","honap",!'ev',"varhato"),2)) >= value(!'ho'),['menny_pal','teny'],if(palo.data("varga_sales","#_vevo","terv_tip",!'vevo') > 1,stet(),if(palo.data("varga_sales","#_vevo","terv_tip",!'vevo') = 1,

palo.data("varga_sales","FORG","menny_pal",!'vevo', !'cikk', concatenate(!'ho',"YTD"),!'ev',!'telephely', !'verzio')

/ palo.data("varga_sales","MEGOSZLAS","megoszlas",concatenate(!'ho',"YTD"),!'vevo'),0)))
Images
• Clipboard01.jpg

183.34 kB, 767×466, viewed 2,124 times
• Hello Vargabor,

try to use IF(eq(Statement1,Statement2),THEN,ELSE)

or

IF(Statement1 == Statement2),THEN,ELSE)

I hope it helps you.

Regards

ZPROF
• RE: IF statemnet and equal sign (=)

Hi,
= wont work, use ==

Holger
• Thanks for your fast respons, I'll try it.
• Out of interest why do we have to use == instead of the normal =

Seems very odd to me
Best wishes

John Hobson
The Planning Factory, Lytham, UK
www.planfact.co.uk
• Hello Pommie,

Here you find a good explanation for this.

Regards,
Stephanie
• Thanks Stephanie - so are you saying that in Palo a test that says "if x == y, then z" means "test if x = y, and if x is not zero, execute the statement following" as opposed to simply "test if x = y and then execute the statement following"?
Best wishes

John Hobson
The Planning Factory, Lytham, UK
www.planfact.co.uk
• Hello Pommie,

Sorry, I guess this link was more confusing than it helped.
Using the IF-statement needs "==" for testing equality and normal
"=" won't work as it stands for assignment.

"test if x = y, and if x is not zero, execute the statement following"

This therefore won't work.

Regards,
Stephanie
• Clear now - Thanks

I think your average Excel user (the target of Palo surely) would be hapier with an = rather than an == however "correct" == might be in strict syntactical terms.

Tm1 uses some pretty weird stuff for logicla comparisions but at least it has just =
Best wishes

John Hobson
The Planning Factory, Lytham, UK
www.planfact.co.uk
• RE: IF statemnet and equal sign (=)

Can I just confirm whether in PALO

!=

means NOT Equal to

J
Best wishes

John Hobson
The Planning Factory, Lytham, UK
www.planfact.co.uk
• RE: IF statemnet and equal sign (=)

Hi John, hope you're not jumping ship permanently!

Yep, != is not equal to.

I think it originates in C. It's also used in PHP and a few other languages.

Martin Ryan
• Hi Martin - Thanks

You know what they say about rats

On a serious note I am extremely impressed by what these guys have done here and I think it's only going to get better!
Best wishes

John Hobson
The Planning Factory, Lytham, UK
www.planfact.co.uk

The post was edited 1 time, last by Pommie ().

• Yes, I like what they're doing too. I'm in the midst of an implementation at an SME firm and they love the price tag. I'm pretty happy with the functionality too.

I wonder what the revenue model is though - waiting for Microsoft to come and buy???
• I suppose the buy out scenario is an obvious one, but it's a different model entirely isn't it?

I imagine that if (as it will) it gains traction, then a few thousand x the annual support fee would make up for a few dozen x an inflated licence cost.
Best wishes

John Hobson
The Planning Factory, Lytham, UK
www.planfact.co.uk