if ( IsEmpty ( field B ) ; Field A ; Field A & "," & field b )
1 of 1 people found this helpful
just a different approach since i dislike if statements
IsEmpty ( f1 ) & IsEmpty ( f2 ) ; "" ;
Not IsEmpty ( f1 ) & Not IsEmpty ( f2 ); f1 & "," & f2;
IsEmpty ( f1 ); f2;
IsEmpty ( f2 ); f1;
*edit forgot to mention, but i do believe the Case() will stop evaluating as soon as one of the criteria are met. So Order matters.
Thank you! That was easier than I expected. For posterity, my actual working script looks like this (I was surprised not to need brackets around the IF statement):
$var = ing_line::ing_name & If (IsEmpty(ing_line::ing_note) ; "" ; ", " & ing_line::ing_note)
Substitute ( list ( field A ; field B ) ; <pilcrow> ; ", " )
also works if you use the parahraph symbol in place of <pilcrow>. This approach allows you to put as many fields inside the list function as you need.