FilterFromFile: Filter Rows with Values from CSV/Excel File
Tag: FilterFromFile
Achieve row selection with values found in a CSV file.
Cf. Filter: Use Column Filters
Tag Attributes
Attributes | Value Description |
---|---|
FilePath | Path of the CSV to use as filter source |
HasHeaders | Set to true if the CSV file first line is a header - defaults to false (first line contains data) |
Detailed Description
For each filter value, one SetParam action is required with:
Field = The corresponding Column ID as shown in the Grid Manager.
Value = column rank in CSV / Excel fil
Column rank in file starts at 0.
Example (Users module in sapio365):
name (index: 0) | weight in kg (index: 1) | age (index: 2) | type (index: 3) | job title (index: 4) | city (index: 5) | continent (index: 6) |
---|---|---|---|---|---|---|
George | 199 | 68 | Member | engineer | Cairo | Africa |
Rodolf | 77 | 31 | Member | engineer | Redmond | Atlantis |
Michele | 29 | 51 | Guest | Consultant | Tulsa | North America |
Code Example
<ytriaAutomation>
<FilterFromFile FilePath="C:\dev\Temp_XML\selectFromFile.csv" HasHeaders="True">
<SetParam field="userType" value="3"/>
<SetParam field="city" value="5"/>
</FilterFromFile>
</ytriaAutomation>