Count columns Version 1 (Net)
Action group: Tables
Description
The action returns the number of columns for the entire table, not for a specific row (similar to the Get Number of Rows action). If "Skip empty columns" is enabled, only if the entire column is empty, it will not be counted.
Action icon
Settings of parameters
Property | Description | Type | Filling example | Mandatory field |
Parameters | ||||
Data table | Table where to count the columns. | Robin.DataTable | Yes | |
Skip empty | If the value is «true», the action will only count the filled columns. | Robin.Boolean | true | No |
Results | ||||
Result | Number of columns in the table. | Robin.Numeric |
Special conditions of use
None.
Example of use
Task
There is a table.
It is necessary to calculate the number of columns in a given table. Output the result to the log.
Solution
Use "Get table from CSV", "Count columns", "Message in log" actions.
Implementation
Let's assemble the following robot scheme consisting of actions:
- Get table from csv;
- Count columns;
- Message in log.
- Set the action parameters
a. Set the parameters for the "Get table from CSV" action :
b. Set the "Table" parameter for the "Count columns" action:
c. Set the parameter for the "Message in log" action. - Start the robot using the "Start" button in the top panel.
Result
The program robot completed successfully.
The number 3 is printed in the log, which corresponds to 3 columns in the table.
Обзор
Инструменты контента