NODENAME_ NODENAME_ _ NODENAME_ NODENAME__
NODENAME_<COLUMN_NUM> but where is dynamic. For example if testCounter=1 SQLQuery3040_1 works, but i want to make the _1 be dynamic, what would be the syntax? I've tried SQLQuery3040_testCounter SQLQuery3040_<.!testCounter> 'SQLQuery3040_'+testCounter and countless others
but where is dynamic. For example if testCounter=1 SQLQuery3040_1 works, but i want to make the _1 be dynamic, what would be the syntax? I've tried SQLQuery3040_testCounter SQLQuery3040_<.!testCounter> 'SQLQuery3040_'+testCounter and countless others
It sounds like you are trying to use a single variable as a reference, and loop through all SQL node output fields using that one reference? Something like this:
ref_var = 1; while (ref_var <= 20) { save_var = SQLNode100_ref_var; ... do stuff with savevar value ... ref_var++; }
Unfortunately, I don't think you can reference the node output values using variables this way - as least I've never found a way to do it. I'd love for someone to prove me wrong...
Do you have a huge number of fields being returned? What exactly are you trying to do? Maybe there is another way.
I could envision changing your SQL query to output a delimited file, and then use the DataIterator node to parse it for processing. You could also build a delimited file from your SQL using JavaScript, but you'd have to allow for the maximum number of fields that could be returned. Then you could follow that with a data iterator. if ((SQLNode1000_1 !== "undefined" && SQLNode1000_1.length > 0)) { csv_string = SQLNode1000_1; csv_string += ","; } if ((SQLNode1000_2 !== "undefined" && SQLNode1000_2.length > 0)) { csv_string = SQLNode1000_2; csv_string += ","; } ... etc.