1. Home
  2. Docs
  3. InfoCaptor
  4. How to create dashboard filters and prompts
  5. Create free text control

Create free text control

Textbox control is useful for selecting single value from a given list of values. This is often utilized in place of select/combo box when there are fewer set of values. 

A) How to add it

1. Expand HTML_Controls section in the left panel
2. Drag the “Textbox Control” and drop it in the center canvas

B) How to add static values This is not applicable for textbox as it is a data entry field 

C) How to add dynamic values This is not applicable for textbox as it is a data entry field 

D) How to change the title 
1. Double click the widget
2. Change the text for header_text 

E) How to change the id/name Every html control passes information to the entire dashboard using a specific channel. And all the data widgets would selectively listen to these channels for any change in values. So when the user selects a different value in the control, this new value is broadcasted to this channel and every widget that is subscribed to this channel is notified of the change.

The widget will then update its data based on the new channel value. The name of the channel is defined using the widgets name property. 
1. Right click on the Widget
2. Select ‘Edit Properties’
3. Scroll up to the top and find “name”
4. Change the value for the name property and give a descriptive name 

Change the name  
In the name, we just appended with a description “location” to indicate that this control is for location Textbox control. You can change the entire name but in this case we just chose to append it and keep the other information as it is. 

F) How to set default value You can set a default value for each control. 
1. Right click on the widget
2. Select “Edit Properties”
3. Go to the top and there is a property “default_value”
4. Set a value     

G) How to use it inside data widgets Now that we have defined the control, we can use this inside any data widget The current value of this control is broadcasted into the channel name “html_textbox_d15_location” and you can reference the contents of thischannel inside any widget’s SQL query by simply saying “param<channel_name>” 

So in this case we can use “param<html_textbox_d15_location>”

(NOTE: it needs to be exactly param<channel_name>, there cannot be any special characters) 

Example 1. Use it in a Grid 
1. Drag a Grid

 2. Right on Grid and select “Data Source”

 3. Enter the following query 

select location,count(location) as employee_total
from [emp_data$]
where location is not null
group by location 

select the excel connection handle

 and then enter the above SQL 

 Click ok and the grid populates with new values 

 Now we will link this grid to the above Textbox control (in short listen to changes on Textbox selection) Right click on the grid, select “Data Source” and modify the SQL to add one more condition for location such as 

select location,count(location) as employee_total
from [emp_data$]
where location is not null
and location like
group by location 

Now click on the “Show Filters/Prompts” button 

 Expand “Input_controls” (3)

 Select the entry “html_textbox_d15_location” and click on “Add Selected Filter” 

This action will add the string “param<html_textbox_d15_location>” wherever your cursor is inside the SQL area.

In our case we left our cursor after the “location = ” Click “close” for the ‘Dashboard Filter/Prompt’ dialog. 

Click OK for the SQL Window. 

The grid now shows as below 

  And the moment you change the selection the grid automatically updates 

 This ends the basic introduction to Textbox selection control for Dashboards    

Value Prefix and Postfix In the properties, at the very bottom there are two important fields

 These are valuePrefix and valuePostfix By default they are set to a single quotation [ ‘ ] value. In case if you want to pass numeric values or some other value like double quotes etc then you can set the value to empy like”valuePrefix”:”” to pass no quotes around the value. Same for valuePostfix

Was this article helpful to you? Yes No

How can we help?