Detect Records

Navigation:  Knowledge Base > Page Editor > Actions > Remote DB Control > User Database > Remote Select >

Detect Records

Previous pageReturn to chapter overviewNext page

Detect Records allows user to execute any action on detecting each record from the Remote database as per the query.

 

In below example, On Clicking on the Detect Records button, all the employees belonging to Singapore city would be displayed by getting appended to the TextField UI Part. i.e Append action is executed each time a record is detected.

 

Step 1: Create an "employee" table in the Remote DB having fields id, emp_name, emp_city. Click here to know more.

Open a Free Layout Page.

a. Drag a TextField and a RoundButton UI part and drop it on the Page.

b. Browse to the "Functions" section on "Properties Palette window" of RoundButton for applying actions.

c. Click on the corresponding Edit(0) button of the Function on which user wants to apply the Action. To know more about the Functions click here.

 

mobilous_appexe_npe_myproject_Actions_localDBcontrol_detect_page mobilous_appexe_npe_myproject_Actions_roundbutton_edit

 

Step 2: Add action by selecting Actions Category as "Remote DB Control" and Action as "Remote Select".

 

mobilous_appexe_npe_myproject_Actions_RemoteDBcontrol_remoteselect_setaction

Click here to know about "Doc" Button.

 

Step 3: Enter Action Parameters:-

 

Parameter

Description

Service Name

Select the service name e.g "Mobilous".

Table Name

Select the table name e.g "employee".

Where

Enter the where parameter. The syntax of where condition is same as SQL i.e Columnname ='data'. Columnname is the name of the table field from the database and data is any entry which is mentioned in that field of database. For e.g  emp_city = 'Singapore'.

Click here for more Examples.

Order

Enter the Order condition to sort the record/ List in ascending or descending manner.

 

mobilous_appexe_npe_myproject_Actions_RemoteDBcontrol_detect_select_setparameter

 

Step 4: Remote Select Action is applied. Click on "+" sign on the right of the action to view the events.

 

mobilous_appexe_npe_myproject_Actions_RemoteDBcontrol_detect_selectapply       mobilous_appexe_npe_myproject_Actions_RemoteDBcontrol_detect_selectapply1

 

Step 5: Select "Detect Records" event and click on "Add" button below to add action e.g "Append Text" action.

 

mobilous_appexe_npe_myproject_Actions_RemoteDBcontrol_detect_select_append_setaction

 

Step 6: Enter Action Parameters:-

 

Parameter

Description

Data

Enter the value which needs to be displayed in the TextField UI Part.For e.g [emp_name]

where emp_name is one of the field of "employee" table.

Target Page

Select the Target Page For e.g "Select".

Target UI Part

Select the Target UI Part For e.g "TextField_0".

 

mobilous_appexe_npe_myproject_Actions_localDBcontrol_detect_append_setparameter

 

Step 7: Detect Records action added as shown below. Click on "OK".

 

mobilous_appexe_npe_myproject_Actions_RemoteDBcontrol_detect_append_added

 

Note: Define condition if required, by clicking on "+" Condition Button on the left. Click here to know more.

 

Step 8: Preview to see the output. Click on Detect Records button. The result appears in the TextField. It appends and displays all the names of employees belonging to Singapore city as applied in the action. The below CSV shows total records in the employee table.

 

mobilous_appexe_npe_myproject_Actions_localDBcontrol_detect_output   mobilous_appexe_npe_myproject_Actions_localDBcontrol_detect_CSV

 

Note: Other actions can be applied in the Detect Records event like Calculate to find sum of records, Count, Average, Maximum value, Minimum value, Move object, Rotate object etc.