jsl script individually working fine, but add-in implementation is not workingI have a data table where I want to replace certain values with "."
Below is the script example
dt = Current Data Table();
for each row (
if (:age == 12, age= . );
);
but same is not working when I have this code as add-in, data table looks like this
vinay 35
atul 55
prerna 12
adi 21
Thanks,
Sibh
Automation and ScriptingMass CustomizationRe: jsl script individually working fine, but add-in implementation is not workingIt's best to be explicit with your table names, such as
For Each Row( dt,
If( :age == 12,<BR /> :age = .<BR /> )
)The function "for each row" can take the table to loop over as the first argument.
Re: jsl script individually working fine, but add-in implementation is not workingEdit: See @ErraticAttack's answer below, that is better.
Hi @SIBH,
Is it possible your current data table is not the one you want to manipulate. In your script you are setting dt equal to the current data table, but you are not setting the data table equal to dt. If dt is already defined somewhere, for example if you already used dt = Open( ... ), then you could set the current data table like this:
Current data table( dt );
Or, if dt references the right data table, you could scope your columns to be in that specific table, like this:
for each row (
if (dt:age == 12, dt:age= . );
);