Tuesday, November 25, 2008

@transform


Have been using this for the first time today. It is a very powerful function - I will be using this more often in the future.

Today I used it to remove all role names from a list:
 
        @Trim( @Transform( authors; "name"; @If( @begins( name;"[" );"";name )) );

Check the Notes Designer help for more examples

1 comments:

Thomas Schulte said...

You can also do things like this with @transform:

i:=0;
@If(fldliste = fldwert; @transform(fldliste; "zeile"; @Do(i := i + 1; @If(zeile = fldwert; i; @Nothing))); 0)

Which takes a list and a value to compare and gives you all the occurances of the value in the list as a set of numbers back.

if List = a:b:c:a:d:e:a and Comparevalue is a you will be given 1:4:7 back.

 
Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License.