1 of 1 people found this helpful
[…] copy info from column 1, but if #1 field is empty then it needs to take the info from #2 field […]
The basic way to do that is …
not IsEmpty ( field1 ) ;
… but I'm not sure that the way you store and use these data is optimal.
I think this would work
SetField (Field3;If (IsEmpty ( field 1) =0; field1 ;field2)
I think this would work […] IsEmpty ( field 1) =0
It does, but it's needlessly convoluted and unclear; one could ask what a 0 has to do with anything. There are more explicit way to test on Boolean values.
And how do you know there is a script involved?
Thanks for the comment.
Just to clarify, i need to say that the "0" tests that field1 si not empty.
I know there are many ways and personal styles to solve different situations..... this is just one of them but not necessarily the best.
Just to note that
if ( isempty(field1) = 0 ; field1 ; field2 )
is the same as
if ( not isempty(field1) ; field1 ; field2)
is the same as
if ( isempty(field1) ; field2 ; field1 )
Aside from that, the List() function may help with this sort of problem. It may not be the answer in this case but you can decide.
if you do this: list( field1; field2 ; field3 ) when field1 = Mr, field2 = Mrs and field3 = Ms
you get this:
if field2 is empty you get this
You can then use substitute( ) to replace the carriage returns and make it readable, eg, Mr & Ms
Thank you erolst for the suggestion - worked perfectly!
GetValue ( List ( Field1 ; Field2 ) ; 1 )