AnsweredAssumed Answered

Write out the contents of a dataset array variable to file.

Question asked by Gold12345 on Jan 2, 2014
Latest reply on Jan 3, 2014 by Gold12345

I have a dataset configured with variables that are a single dimension array.
I want to write the whole contents of the array variables to a file.

I have enabled "File Contents As Array" within the "Write File" operator.
I can then write out individual indexed values as follows-

Datasets["datasetname"].varname[0]
Datasets["datasetname"].varname[1]

There are 100s of indexed values in my variable, so don't want to do this for all.
I've tried the following, but this results in error
    Datasets["datasetname"].varname

also
    Datasets["datasetname"].varname.toString
results in-
    org.mozilla.javascript.IdFunctionObject@47df3659

also
    Arrays.toString(Datasets["datasetname"].varname)
results in the same line printed to the text file

 

UPDATE:

If I don't enable "File Contents As Array" and enter the "File Contents" as -
    Datasets["datasetname"].varname
, then the array is output to the file.

This still doesn't enable me to print more than 1 variable. I tried entering the "File Contents" as -
    Datasets["datasetname"].varname,Datasets["datasetname"].varname2

, but this only outputs the second variable.

Is the expected usage to use more than 1 "Write File" operator?

 

Outcomes