Using Not Equals

The use of != is causing a problem. Is there a change in a new release to how it works?
I had

	if([GLOdimid] != 0)
		{
            echo "inside condition";
	{dimid} = [GLOdimid];
	       ;}

With this code, the {dimid} was set to zero, even though it was in a non zero condition
This however works

	if([GLOdimid] > 0)
		{
               echo "inside condition";		
               {dimid} = [GLOdimid];
	       ;}

Hi
try with !== or convert types

Operator Compare Convert Types? Example (5 vs “5”)
!= Only value Yes (coercion) false (because “5” becomes number 5)
!== Value and type No true (because 5 is int, but “5” is string)

Thank You so much. Appreciate that

Are you sure it was set to zero? It could also be undefined or null. I have often run into issues with SC because NULL isn’t NULL, it is a string that says “null”.

Right before your if statement, add “var_dump([GLOdimid])”. That will tell you what it truly is.

It’s a good point. Because I wrote a series of iff statements and it seems to be a Null. I will try what you said.
My problem is however, it worked for years and then suddenly it may have turned to a Null. I was wondering if there was a change to SC along the way that would have done this. If so, I have a mess load of code to test

It is highly possible something has changed. I only upgrade at specific set times of the year and do extensive testing afterwards.

If the test is a problem, can you easily restore versions?

Yes, as long as you’ve made a copy of the SC folder before you upgrade