@Transform

I’ve found a number of postings on using @Transform, but for whatever reason I can’t get this function to work for me. This is what I have:


ConfigKeys := @DbColumn( “”:“NoCache”; “”:“”; “Config”; 1 );

AttributeKeys := @Transform( ConfigKeys; x; @If( @Begins( x; “Attribute-” ); x; @Nothing ) );

AttributeKeys


ConfigKeys will return at text list containing values like:

“Attribute-Support”

“Attribute-Tasks”

“SalesTax”

What I want is to strip out any values that don’t begin with “Attribute-”.

This should be simple, and yet here I am 45 minutes later still trying to figure out why it’s not working. Everything is getting stripped out, so it appears the formula in the @transform is not behaving how I would expect.

Thanks in advance,

Jon

Subject: @Transform

It’s

AttributeKeys := @Transform(ConfigKeys; “x”; @If(@Begins(x; “Attribute-”); x; @Nothing));

if I remember right off-hands.

Subject: RE: @Transform

Indeed - the variable name needs to be in quotes. Isn’t it always something like that…

Thank you kindly for your help,

Jon

Subject: RE: @Transform

And by the way: In about 90% of all examples you will see, @Transform can be replaced by simple list operations, like:

ConfigKeys := @DbColumn(“”:“NoCache”; “”:“”; “Config”; 1);

“Attribute-” + @Trim(@Right(_list; “Attribute-”));