Page 1 of 1

Checking for empty string from database field

Posted: Tue Feb 01, 2011 12:52 pm
by plantant
In my database a field has an empty string, that content can be accessed via {Supplier_Info.address2}

When there is data, I can check the length like this: {Supplier_Info.address2.Length}, however, when it is an empty string, this does not work. Is there another way to check for empty string?

Im using this in an if statement:
{IIF(Supplier_Info.address2.Length > 0, "", "")}
More text here

If it is blank, it does not continue to print the next line.

The only way I have been able to check for an empty string is like this:
{IIF(Supplier_Info.address2 + " " == " ", "", "")}
More text here

Thanks

Checking for empty string from database field

Posted: Wed Feb 02, 2011 2:39 am
by Vladimir
Hello,

We have improved the expression parser, now the Length() function and Length method will work properly. Also we have added check for null values. The update will be available in the next prerelease build on February, 8.

Thank you.

Checking for empty string from database field

Posted: Wed Feb 02, 2011 6:32 am
by plantant
Great! Thanks for the quick updates. This is a great product and once now that I've gotten the hang of it, it makes things so much easier!

Looking forward to the release,

Danny

Checking for empty string from database field

Posted: Wed Feb 02, 2011 7:24 am
by Vladimir
We are always glad to help you!

Thank you.