Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6391 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Here in an interesting thing I found today. I have attached a sample file. I have used a list () on some let variables in a calc.

This behavior could possibly be associated with this recent thread but I dont think directly.

http://fmforums.com/forum/showtopic.php?tid/186557

List_Test.zip

Posted

Sorry Mike. I thought that the example would explain it.

The list () returns a value of 0 if a flag boolean field is zero where a test is made as such: Case ( flg_car; "Car" ).

It will return

House

0

Job

However if Case ( GetAsBoolean ( flg_car ); "Car" ) is used, then it returns null.

House

Job

So I tested it as a concat thinking that the let was passing the value zero. However, it returns null, as the concat returns "HouseJob".

So why does using the list function return a zero instead of the null when GetAsBoolean is not used?

Posted

It looks like a bug to me. The variable should be empty, and probably classified as Text. Note that the problem goes away if the variable is expressly defined as Text.

I am guessing something in the order of evaluation causes the variable to be forced into a number, under these particular circumstances.

This topic is 6391 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.