how to fill columns missing content with a required content by JSLkindly help to suggest how to fill columns missing content with a required content by JSL, from left to right, auto fill in missing content with "Sold", refer to below tables. (actually the table and the columns is not limited, more than the table list). many thanks
Find on JSL but not work, :Name("Sold or not?")[ dt<< get selected rows ] = "Sold";
| Column Name | Sold or not? | | | Column Name | Sold or not? |
| Apple | Not | | | Apple | Not |
| Orange | | | | Orange | Sold |
| pineapple | Not | --->' | pineapple | Not |
| blueberry | | | | blueberry | Sold |
| durain | Not | | | durain | Not |
| pear | | | | pear | Sold |
| banana | | | | banana | Sold |
ScriptingRe: how to fill columns missing content with a required content by JSLHere is one way of handling your issue
Names Default To Here( 1 );
dt = Current Data Table();
colNames = dt << get column names( string, character );
For( i = 1, i <= N Items( colNames ), i++,
Column( dt, colNames[i] )[dt << get rows where( As Column( dt, colNames[i] ) == "" )] =
"Sold"
);