I am trying to extract a value out of a table using the following JSL:
::GlobalVariable= :Column[RowNumber]
However, my output for ::GlobalVariable has unwanted {" "} around it. How do I remove this/prevent this from happening? Thank you!
It appears that your column that you have nemed "Column" has list values saved in it. That wouls account for the {} in your variable called ::GlobalVariable. And that inside the list definition, there is a string element, which is where the "" are coming from. I am assuming that you did not intend for the values within :Column to be this. So I would look to see where the values are coming from, rather than trying to delete them after the fact. But if that is not possible, I would use the Word function if the value has {""} imbedded in a string, or if it is actually being returned as a true list, then you can simply specify a subscript to get rid of the list component.
::GlobalVariable = word(1,:Column[RowNumber],"{}"); // or ::GlobalVariable = :Column[RowNumber][1];
I am facing the same problem with slight variation. I combine 2 columns and get the values of resulting column as a list.I then assign this list to a cell.When I do so,the output is {"100@boiling","0@melting"}.I need to remove {" "}.How can I do this?Below is my code-
//Combine temperature and process step columns to get test temperature dtCombined = dtSorted << Combine Columns( delimiter( "@" ), Columns( :Temperature, :process ), //Selected Columns are Indicator Columns( 1 ), Column Name( "Process_Temperature" ) ); unique_vals = {}; unique_vals = Associative Array(dtSorted:Process_Temperature) << Get Keys; Column(dtemplate,"Value")[30] = Char(unique_vals) ;
you can use the parse() funcction to do that:
x="zippy"; show(parse(x))