Trim All Input Fields at Once

I am trying to do this:
$out.0.* = trim($in.0.*);

But it is not working with the following error msg:

Function trim(string) is not applicable for the arguments (record(recordName1))

Anyone knows if this is possible of trim all input at once?

Perri

Hi Perri

Of course it is possible, however as the error message implies, you cannot use the trim() function for an argument that is not a string. So you need to get the string value of each field first, trim it and then send it to output. For such cases the CTL2 utilizes so called dynamic field access functions. These are able to get the values from record field without knowing their count or names before the graph starts. Please see the attached graph where these are implemented.

trim_all_fields.grf
Best regards