Formula help needed!

Hi there,

I have written a code to modify the value of a field (Notes1) as follows:

VarN1a:=@Left(Notes1; 5);

VarN1b:=@RightBack(Notes1; “/”);

List1:= VarN1a : " " : VarN1b : “.enc”;

VarN1c:= @Implode(List1; “”);

VarN1c

What i wanted was if ‘Notes1’ field is empty (“”) it should retain that value and skip this code.

Any ideas how i could achieve that? I tried to work with @If but could’nt achieve the desired result.

Thanks for all your help!

Ayaz

Subject: Formula help needed!

Where does this code run? In the field’s Translation formula?

Subject: RE: Formula help needed!

It is in the ‘Default value’ …

Thanks for responding …

Subject: RE: Formula help needed!

Hmmm - you will have a problem.

The field’s Default formula ONLY executes if the field doesn’t exist in the document which in practice means that its value is “”

So, your code will never execute because even if you get the @If statements correct, you wish to preserve the “” if that is the value of the field and this will be the case for new documents.

I suppose that you want to do this in the Translation formula but in that case, you have to be careful to not modify the field by adding the “.enc” each time the document refreshes.

Maybe you should describe what you are trying to achieve.

Subject: Formula help needed!

Thanks a lot guys!

Subject: Formula help needed!

Just test for the value first before giving the end value.

@If(Notes1 = “”; “”; VarN1c)

Subject: Formula help needed!