Subscribe Bookmark RSS Feed

Script issue with Select/Exclude Rows

shaun

Community Trekker

Joined:

Jun 23, 2011

I have a script I need to add a data filter in before i run it which creates some charts. I have tried select where and exclude functions as well as the data filter script shown below:
Current Data Table() << Data Filter(
Add Filter( columns( :VRchartExcCol ), Where( :VRchartExcCol == 1 ) ),
Mode( Select( 0 ), Include( 1 ) )
);
I have tried iterations of the above on different columns and datasets and I cannot get the row select to work in the script. It works when running the data filter on its own outside the script and I can copy out the script from there (pasted above) but when the above is inserted and run in script either by itself or in the main script, the only functions which execute are:
Current Data Table() << Data Filter(
Add Filter( columns( :VRchartExcCol ),
Mode( Select( 0 ), Include( 1 ) )
);
Can you select and exclude rows in scripts?

Message was edited by: shaun
1 REPLY
ms

Super User

Joined:

Jun 23, 2011

If you just wish to conditionally exclude rows and not really need the Data Filter window, you can set row states with the often useful function For Each Row().

For example


This script line loops through all rows and excludes rows where column Sex is not "F".