It is used when it is desired to assign values by selecting from the drop down box in the form.
Fixed values, dynamic values with Sql Query or information taken from Xpoda Addon can be brought to this form element. When the drop down box form tool is clicked, the values sent into it are brought according to the order of submission, allowing the user to make a selection.
| Appearance in Toolbox | Appearance in FreeForm | Appearance in Responsive |
Compatibility
| Free Form | Responsive Form | Mobile |
Properties
Type(Field Type): Shows the field type of the added form widget. The value here cannot be changed.
Name(Field Name): The name of the field to be created in the database is written.
Info Text: On the client side, information text can be written about how to enter information into the element.
Field Type: Select from this field to determine how the data in the drop down box will appear.
1)If Combo Box is selected: It is used when it is desired to assign values by selecting from the drop down box tool in the form. Fixed values, dynamic values with Sql Query or information from Xpoda Addon can be brought to this form element. When the drop down box tool is clicked, the values sent into it are brought according to the order of submission, giving the user the opportunity to make a selection.
2)If Drop Down Box is selected: Drop Down Box feature, unlike Combo Box, offers search feature to the user and displays the first data in the drop down box form tool by default as shown below. (Istanbul)
3)If Multiple Column is selected: Multiple Column feature can display data with more columns compared to other drop down box form tools. However, unlike Drop Down Box and Combo Box feature, Data Text Field and Data Value Field fields must be set correctly. Otherwise, '[object Object Object]' error may be received.
First click on the relevant component on the Xpoda Studio screen, then click on the properties icon, select Field Type field 'Multiple Column'. Since Field Style field is selected SQL Query, sql query is written in Sql Server field. Finally, Data Value Field and Data Text Field fields must be entered as mandatory.
Data Value Field ='UserID' → Unique ID value to be used in the background.
Data Text Field = 'UserFullName' → Name information to be displayed to the user.
Click the save button on the Xpoda Studio screen, after saving, go to the Client screen with the Run button and display the drop down box.
Sample query written in the Sql Query field:
SELECT
1 AS UserID,
'User1' AS UserFullName,
'user1@xpoda.com' AS [Mail],
'Form1' AS UserOpenForm
UNION ALL
SELECT
2,
'User2',
'user2@xpoda.com'
'Form2'
UNION ALL
SELECT
3,
'User3',
'user3@xpoda.com',
'Form3'
Field Style:It is selected from where the values that will come in the drop down box will draw information (Constant Value, Sql Query or Xpoda Addon).
1)If Field Style field 'Constant Value' is selected:
If Constant Value is selected in the Field Style field, you can type your data in the Values(Text*Value) field.
When you type values in this field, the values are saved in the database as the same values.
The following screen will appear automatically after you focus on another field.
You can type the value that is saved in the database yourself. In this place, the first part appears on the Client screen. The second part is saved in the database.
2)If Field Style field 'Sql Query' is selected:
If SQL Query is selected in the Field Style field, you can write a query from the SQL query field and retrieve the desired data from the database. Here, the first data is saved in the database. The second data appears on the Client screen.
When a field style SQL Query is selected, information from any existing table in the database can be listed in the drop down box tool. The important thing here is to select two fields from the table. The first field we write is the part that is saved in the database and the second field we write is the part that will appear in the drop down box tool.
Writing a query can be done with the Xpoda wizard without writing code. Clicking on the part marked in red on the screen below opens the wizard and the fields are included in the SQL query by drag and drop.
Clicking on the wizard opens the following area. Tables are available on the left side. To open the fields in the required table, just click on the arrows next to the desired table name. Drag and drop the desired fields to the area shown below.
Default Value: The value entered here defaults into the form tool on the Client screen.
Table Length: Enter the length of the field to be created in the database. Changes made in this field after the project is saved will not affect the database.
Text Size: The font size of the values displayed in the selection box is determined in this field.
Any size change made here does not only affect the text appearance; the height of the Drop Down control is also automatically updated based on the selected text size.
When the text size is increased, the height of the Drop Down control is automatically increased by the system to prevent content overflow and maintain readability. Similarly, when the text size is decreased, the control height is proportionally reduced.
For this reason, the height of the Drop Down control is not set manually but is dynamically managed according to the Text Size value specified here.
Minimum Characters: When too many values are sent into the drop down box tool, a number is entered in the minimum value field so that the system does not slow down. For example, assuming that 3 is entered in the minimum character field, if 3 characters are entered in the drop down box, the values containing these 3 characters will be filtered and displayed. Unless 3 characters are entered, no value will be listed.
| When the form page is first opened, the values in the drop down box do not appear. If 3 characters are entered in the drop down box, the appropriate results will be filtered. | |
Icon: Assign an icon to the area to be added, select its color and position.
Text Fonts: The text font can be changed.
Color: Adjusts the color of the text inside and/or inside the form tool.
From Left / Top: Adjusts the position of the form tool from the left and top.
Format: The data type with which the drop down box tool is created to the table in the database is selected from this field. If left blank, it is created in nvarchar data type by default.
Linked Object: It is provided to bring a value from an object element created with the Create New Data Object action. When the object element runs, information is filled according to the object area.
Selection is made from the fields inside the linked object area.
In order for the column names in the query in the object created with the Create New Data Object action to be displayed in the Linked Object Area, a constant value must first be used in the object query. Column names returned from the query will be displayed in the Linked Object Area field.
After the relevant column name in the object query is selected in the Linked Object Area field, the object query in the Create New Data Object action can be made parametric again.
Click here to go to the Create New Data Object action.
Values: This field changes according to the selection made in the Field Style field.
When Constant Value is selected, the values should be written one after the other.
The information before the * statement (Text section) is the information that the user will see when the drop down box tool is clicked on the Client screen.
The information after * (Value section) is the value that will be kept in the database.
If it is desired that the value to be displayed when the drop down box tool is clicked on the Client screen and the value to be kept in the database when the selection is made from the drop down box tool to be the same, it will be sufficient to write only the information before the * expression (Text section) in this field.
When only the information before the * (Text section) is entered in the relevant field, the system will automatically copy this information to the field after the * (Value section).
When the drop down box tool is clicked on the client screen, the user will see the relevant text, but if it is desired to save a numeric value to the database when the selection is made from the drop down box tool;
The relevant text can be written in the information (Text section) before the * statement and the numeric value can be written in the information (Value section) after the * statement.
If the selection made in the Field Style field is SQL Query, the field here will change.
Dynamic values can be sent to the drop down box with the query. During this submission, two fields (values) must be sent while writing the query. The first value is the value that will be kept in the database and the second value is the value that the end user will see when he/she clicks on the drop down box tool on the Client screen. If two values are not sent, Not Data Found will be displayed and no result will be returned.
Data Text Field: This is the section where the field containing the information to be displayed to the user when the drop down box tool is clicked on the Client screen from the query in the drop down box tool is written.
Data Value Field: From the query in the drop down box tool, when the drop down box tool is clicked on the Client screen, the field containing the value to be saved in the database is written.
Tab Order No: Specifies the order of the form tool on the tab key.
Multiple Selection: Allows multiple selection among the values in the drop down box.
| The selected values are separated by commas in the database. For example, the information that will be stored in the database when Belgium and Denmark are selected and saved: Belgium, Denmark When using the Multiple Selection feature, records of nvarchar data type are added to the database. For this reason, the Text option can be selected from the format section or the format section can be left blank. When the format section is left blank, the system creates the data type of the related field as nvarchar by default. Since the data to be kept in the database may be long when the Multiple Selection feature is used, the Table Length value, where the length of the field to be created in the database is entered, can be written high. A maximum value of 4000 can be entered. |
Fit Horizontal: Fits the form tool horizontally to the full screen on the user's screen.
Pin Right: Pins the form tool to the right.
Display: Makes the form tool not visible on the Client screen.
Form Only: Allows the information entered in the form tool to be created only in the form by not saving it to the database. Subsequent changes made here do not affect the database.
Auto Fill: When the form is opened on the client screen, the query in the drop down box runs in the background and fills the data in the drop down box. When the user clicks on the drop down box tool, they can directly view the data in the drop down box.
When this feature is off, when the user clicks on the drop down box tool, the query in the drop down box runs and the returned data is displayed.
Selection Compulsory: If this feature is on, it becomes mandatory to select one of the options in the drop down box. If the user tries to enter a value that is not defined in the drop down box, the system automatically deletes this value and displays the drop down box with the first option selected.
Actions that can be used in the Drop Down Box tool
There are different actions for each added form element on the form page. The actions defined for the Drop Down Box tool are as follows.
On Focus: It works when the mouse is clicked into the drop down box or when the enter keys are pressed from the keyboard.
On Blur: It works when another element is passed through the drop down box.
On Value Change: It works when the value inside changes.
Keyboard Input: Works when any operation is done with the keyboard.
Validation: When the value inside the drop down box changes, it is used to check the value
Icon Clicked: If an icon is added to the form tool, it works when this icon is clicked.
Template
To add a template to the drop down box form tool, first select the drop down box form tool and then click on Add Customization (No:3) on the drop down box.
On the left side of the screen, under the drop down box form tool, the Template screen will be displayed as added and the Template screen will appear. Drag and drop the necessary components to the Template screen as shown in the image below.
In order to show the UserID and UserFullName data in the SQL query in the SQL Query section of the Drop Down Box form tool in the template property, let's drag and drop four Label form tools to the template area and name them. Two of these four Label tools are headers and the other two are the fields that we will use when pulling the data from the table. For this reason, after writing ID, Name in the first two Label tools, let's write $PUserID$ and $PUserFullName$ (in $Pxxxx$ format) (No:8, No:11) in the Label tools we added opposite them. The final version of our Template tool will be as follows.
Template Field fields must be filled in for the fields from which we will extract data. Otherwise the template feature will not work.(No:9,No:12)
The Value option has been selected for the SQL query in the SQL Query section of the SQL Query section of the Drop Down Box form tool, since a numeric value such as $PUserID$ in the XPODA_CLIENT_USERS table will be displayed. (No:9)
For the $PUserFullName$ Label field, the Text option has been selected because it returns a textual value result such as First Name Last Name from the XPODA_CLIENT_USERS table.(No:12)
| If the Field Type property of the drop down form tool is selected as 'Multiple Column', the Column Name field in the 2nd image should be filled in order for the system to understand which column to create a template for. |