AnsweredAssumed Answered

Null Values in Lists Vs. Carriage separated strings

Question asked by smith7180 on Sep 22, 2014
Latest reply on Sep 23, 2014 by smith7180

I adopted Lists() early on as my preferred method for passing multiple parameters. However, I'm increasingly dissatisfied with the inability to pass null "" paramters. So I tried ditching the list function and simply using carriage returns.

 

This:

tableA::Field_1 & ¶ &

tableA::Field_2 & ¶ &

tableA::Field_3

 

As opposed to thisL

List (

tableA::Field_1;

tableA::Field_2;

tableA::Field_3

)

 

I just succesfully tried a quick test script on the first method. Simply passed 5 fields as parameters. 1 and 5 had values A and B. 2-4 had no value. Script just displayed message:

"P1 =" & GetValue ( Get ( ScriptParameter ); 1) & ¶ &

"P2 =" & GetValue ( Get ( ScriptParameter ); 2)& ¶ &

"P3 =" & GetValue ( Get ( ScriptParameter ); 3)& ¶ &

"P4 =" & GetValue ( Get ( ScriptParameter ); 4)& ¶ &

"P5 =" & GetValue ( Get ( ScriptParameter ); 5)

 

The script displayed:

P1 = A

P2 =

P3 =

P4 =

P5 = B

 

Am I missing something? Does manually constructing a list using "¶ " get you all the benefits of a regular list plus the ability to have null parameters?

 

Edit: I only posted this after I felt like I had sufficiently googled the issue. Of course as soon as I post I find this tidbit from Jeremy Bante on the fmforums: "The difference between the two is that concatenating returns will preserve empty values."

 

Still I wonder though- is that all? Is there any catch or dangers to manually constucting a list?

 

Thanks.

Outcomes