is this an RFE? Selecting DAT contents based on cell values

Hi,

maybe there’s a way to do this, otherwise it’s a strong RFE from me as I keep bumping into “not finding a clean way to do this”…

I have a table, something like

INDEX NAME MODE PATH
0 name1 PLAY $shMedia/myname.wav
1 name2 STREAM $shMedia/myname2.wav
2 name3 STREAM $shMedia/myname3.wav
3 name4 PLAY $shMedia/myname4.wav

I want to select the above and get a table which only contains the first row (column names) and all subsequent rows where MODE==STREAM

??
d

To add on to the same RFE, in the same table I have to find the row in which NAME is equal to the name I’m looking for, and select that row.

so basically I have to select one or more rows from tables based on individual cell contents, not necessarily by row and column names.

Of course I could have NAME be the first column, or MODE be the first column, but unless I do that manually, there seems to be no way in the Sort DAT to move those columns around.

I think a solution could be either a Sort change or a Reorder DAT, for example where I can say that I want the NAME column moved to be first, and I don’t care about the others (or else I could also specify an arbitrary order for some of the others).

So yeah, something that makes me move an arbitrary column or row to be the first columne or row, then Select would work on that.

d

You need to get to know the Evaluate DAT! This is the most powerful operator in the DAT set, but thinking about expressions in a procedural way takes a little getting used to. I’ve attached am example that does the things you needed.

some handy variables:
$V = current value
$R = row index
$C = column index
evalDATexamples.tox (838 Bytes)

I’ll also be making a change to the Select DAT sometime soon to make this easier.

Selina

does this by any chance mean that the order of row/col names in the select string will be used in the select DAT’s output?

Three new(ish) expressions that are also of help when looking for a particular row or column value are tabfind, tabfindincol, and tabfindinrow. They can be used in scripts and Evaluate DATs to look for certain values, I find them quite useful.

it would likely mean that you can select rows or columns based on the values of a column or a row.
the order of row and column names shouldn’t have an effect.

Selina