There are many ways to use the Create Index operator. You can use it to add new rows of information to an existing data table, or use it to filter out a specific row of data. You can also use it to number each row of a data table.
Let's say you have a table of patients, and you want to assign each a number. You can use the Create Index operator to assign these numbers.
Configuration
In this article, you'll learn how to use the Create Index operator to number table rows.
These instructions assume you have a new module open, saved, and with a title.
Configure the Data Table Component
First, you'll set up a Data Table component with a list of patient names, dates of birth, and insurance status.
In the Module Builder, drag and drop a Data Table component onto your canvas.
In the Property ID and Label Text fields, enter
dtPatients.In the data table, enter the following:
firstName
lastName
dob
insurance
Art
Venere
11/11/1988
Yes
Alisha
Slusarski
6/30/1974
No
Blair
Malet
12/22/2000
Yes
Willow
Kusko
5/27/1984
No
Meaghan
Garufi
4/13/1994
Yes
Abel
Maclead
2/18/1965
Yes
Willow
Kusko
5/27/1984
No
Ernie
Stenseth
6/1/1966
Yes
Jose
Stockham
11/11/1988
Yes
.png)
Click Save Component.
Configure the Initializer Component
Now, you'll set up an Initializer component to trigger the Data Workflow you add in a later step.
Drag and drop an Initializer component onto your canvas, placing it below your Data Table component.
In the Property ID and Canvas Label Text fields, enter
initPatients.From the Trigger Type drop-down, select New Submission.
In the Outputs table, enter the following:
#
Source
Type
Value
1
dwfPatients
trigger
GO
.png)
Click Save Component.
Configure the Hidden Components
In the first Hidden component, you'll store your Data Workflow's output. In the second, you'll store the index data. That way, you can display stored data and your new data in the same dashboard.
Drag and drop two Hidden components onto your canvas, placing one after the other below your Initializer component.
In the Property ID and Canvas Label Text fields for each component, enter the following:
#
Property ID
Canvas Label Text
1
patients
patients
2
vgIndex
vgIndex
Set Store Data in Database to
(ON) for both hidden components.Click Save Component for each Hidden component as you add it.
Configure the ViewGrid Component
Next, let's add a ViewGrid component so your end-user can view the patient information.
Drag and drop a ViewGrid component onto the canvas, placing it below your Data Table component.
In the Property ID field, enter
gridPatients.In the Label Text field, enter
Patients.In the Action field, enter
null.In the Inputs table, enter the following:
#
Source
Required
1
patients
Not required
In the Outputs table, enter the following:
#
Source
Mapping
1
vgIndex
index
In the Display table, enter the following:
#
ID
Formula
Heading
1
patientIndex
Chart Number
2
firstName
First Name
3
lastName
Last Name
4
dob
Date of Birth
5
insurance
Insurance
.png)
Click Save Component.
Configure the Data Workflow Component
Now, you'll set up your Data Workflow component with a Create Index operator that adds a number to each row of your table. Instead of beginning your list with the default [0], you’ll begin with [1]. So, [1] represents the first row of your data table, and subsequent numbers represent table rows from top to bottom. You'll also add a Console operator so you can view the results in the DevTools Console.
Drag and drop a Data Workflow component onto your canvas, placing it below your ViewGrid component.
In the Property ID and Canvas Label Text fields, enter
dwfPatients.
Configure the First Input Operator
Drag and drop an Input operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Input
Component
dtPatients
Required
No
Source
Default
Configure the Create Index Operator
Drag and drop a Create Index operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Create Index
Label
Patients
Index Name
patientIndex
Starting Index
1
Keys
Connect the output port (right) of the
dtPatientsInput operator to the input port (left) of thePatientsCreate Index operator.
Configure the Output Operator
Drag and drop an Output operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Output
Component
patients
Action
value
Connect the output port (right) of the
PatientsCreate Index operator to the input port (left) of thepatientsOutput operator.
Configure the Console Operator
Drag and drop a Console operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Console
Label
Indexed Patients
Connect the output port (right) of the
PatientsCreate Index operator to the input port (left) of theIndexed PatientsConsole operator.Click Save Component.
Save your module.
The fully configured Data Workflow component looks like the following:
.png)
Here's how your module looks in the Module Builder:
.png)
Preview your module and open up the DevTools Console. You can see patient information from your Data Table component populate in your dashboard. In the DevTools Console, you can see the index numbers associated with each row of data.
.jpg)
There are many ways to use the Create Index operator. You can use it to add new rows of information to an existing data table, or use it to filter out a specific row of data. You can also use it to number each row of a data table.
Let's say you have a table of patients, and you want to assign each a number. You can use the Create Index operator to assign these numbers.
In this article, you'll learn how to use the Create Index operator to number table rows.
Configuration
In this how-to guide, you'll learn how to use the Create Index operator to number table rows.
These instructions assume you have a new module open, saved, and with a title.
Configure the Data Table Component
First, you'll set up a Data Table component with a list of patient names, dates of birth, and insurance status.
In the Module Builder, drag and drop a Data Table component onto your canvas.
In the Property ID and Label Text fields, enter
dtPatients.In the data table, enter the following:
firstName
lastName
dob
insurance
Art
Venere
11/11/1988
Yes
Alisha
Slusarski
6/30/1974
No
Blair
Malet
12/22/2000
Yes
Willow
Kusko
5/27/1984
No
Meaghan
Garufi
4/13/1994
Yes
Abel
Maclead
2/18/1965
Yes
Willow
Kusko
5/27/1984
No
Ernie
Stenseth
6/1/1966
Yes
Jose
Stockham
11/11/1988
Yes
.png)
Click Save & Close.
Configure the Initializer Component
Now, you'll set up an Initializer component to trigger the Data Workflow you add in a later step.
Drag and drop an Initializer component onto your canvas, placing it below your Data Table component.
In the Property ID and Canvas Label Text fields, enter
initPatients.From the Trigger Type drop-down, select New Submission.
In the Outputs table, enter the following:
#
Property ID
Type
Value
1
dwfPatients
trigger
GO
.png)
Click Save & Close.
Configure the Hidden Components
In the first Hidden component, you'll store your Data Workflow's output. In the second, you'll store the index data. That way, you can display stored data and your new data in the same dashboard.
Drag and drop two Hidden components onto your canvas, placing one after the other below your Initializer component.
In the Property ID and Canvas Label Text fields for each component, enter the following:
#
Property ID
Canvas Label Text
1
patients
patients
2
vgIndex
vgIndex
Set Store Data in Database to
(ON) for both hidden components.Click Save for each Hidden component as you add it.
Configure the ViewGrid Component
Next, let's add a ViewGrid component so your end-user can view the patient information.
Drag and drop a ViewGrid component onto the canvas, placing it below your Data Table component.
In the Label field, enter
Patients.In the Property Name field, enter
gridPatients.In the Action field, enter
null.In the Inputs table, enter the following:
id
Required
patients
Not required
In the Outputs table, enter the following:
id
Mapping
vgIndex
index
In the Display table, enter the following:
id
formula
heading
patientIndex
Chart Number
firstName
First Name
lastName
Last Name
dob
Date of Birth
insurance
Insurance
.png)
Click Save.
Configure the Data Workflow Component
Now, you'll set up your Data Workflow component with a Create Index operator that adds a number to each row of your table. Instead of beginning your list with the default [0], you’ll begin with [1]. So, [1] represents the first row of your data table, and subsequent numbers represent table rows from top to bottom. You'll also add a Console operator so you can view the results in the DevTools Console.
Drag and drop a Data Workflow component onto your canvas, placing ti below your ViewGrid component.
In the Canvas Label Text and Property ID fields, enter
dwfPatients.
Configure the First Input Operator
Drag and drop an Input operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Input
Component
dtPatients
Required
No
Source
Default
Configure the Create Index Operator
Drag and drop a Create Index operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Create Index
Label
Patients
Index Name
patientIndex
Starting Index
1
Keys
Connect the output port (right) of the Input operator to the input port (left) of the Create Index operator.
Configure the Output Operator
Drag and drop an Output operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Output
Component
patients
Action
value
Connect the output port (right) of the Create Index operator to the input port (left) of the Output operator.
Configure the Console Operator
Drag and drop a Console operator onto your Data Workflow canvas.
Configure the operator's Info window as follows:
Setting
Value
Category
Console
Label
Indexed Patients
Connect the output port (right) of the Create Index operator to the input port (left) of the Console operator.
Click Save.
Save your module.
The fully configured Data Workflow component looks like the following:
.png)
Here's how your module looks in the Module Builder:
.png)
Preview your module and open up the DevTools Console. You can see patient information from your Data Table component populate in your dashboard. In the DevTools Console, you can see the index numbers associated with each row of data.
.jpg)