From wiki.ginstr.com
Jump to: navigation, search

Action Library

All possible actions on widgets are defined here. Event type defines how an action is triggered. If an action does not have an event associated with it then it has to be nested in an action that has one in order to execute it. Action defines what will be done after trigger (event).

Actions can be categorised by the following:

  1. By an event type:¸
    a. Event bound 
    actions can be written like an XML attribute of a widget
    b. Not event bound 
    actions need to be part of another action executed in a set or as value of other action
  2. By database relation
    a. With database relation 
    these actions perform some task on database (query, insert, update data), and usually have “gn:data_” parameters from same or related widget.
    b. Without database relation

The table below contains a brief description of all possible actions.

Full details on each action can be found by clicking on the Action Name

Action Brief Description
gn:act_blockBack Action that blocks going to previous screen if user presses hardware back button or executes gn:act_goLayoutBack
gn:act_goLayoutBack Returns to previous screen
gn:act_validateScreen Validates entire screen when executed
gn:act_toast Displays toast message
gn:act_cleanWidgets Cleans widget of contents
gn:act_queryWiFiFingerprint Action used to return all data for specific user from table which contains WiFi fingerprint values
gn:act_queryGSMFingerprint Action used to return all data for specific user from table which contains GSM fingerprint values
gn:act_queryBTFingerprint Action used to return all data for specific user from table which contains BT fingerprint values
gn:act_fill_dropdown Action used to fill GnDropDown widget with values from local sources
gn:act_if Special action that acts as a conditional action. It accepts other actions as conditions and other actions that are defined to execute if condition was true or if it was false. If all conditions are true action will execute true block of actions, if any condition is false action will execute false block of actions.
gn:act_hideWidgets Action that hides widgets on the screen. It can be used to hide one or more or all widgets on the screen
gn:act_showWidgets Action that shows widgets on the screen. It can be used to show one or more or all widgets on the screen
gn:act_isChecked Action that returns if GnCheckBox widget is checked or not
gn:act_hideKeyboard Action that hides keyboard.
gn:act_hasTableRights Action that returns if logged in user has rights to specific table or not. To be used only after user has passed login at GnLogin widget
gn:act_getTargetLength Action that gets length of the content from targets
gn:act_convertDatatype Action that converts value from one source and converts it to value of target which is then saved to some target
gn:act_setSelectedItem Dropdown must contain data before setSelectedItem is used. This action selects dropdown item GnDropDown. The action must be declared at GnDropDown widget on which item will be selected in an action set.
gn:act_copyData Replaced by gn:act_copyDataNew. Copies content from source widget to destination widget.
gn:act_copyDataNew Copies content from source target to destination target.
gn:act_widgetContent Checks content of a widget and compares it with keyword. This is useful for business logic checks depending on some result or data in some widget, field
gn:act_widgetContentJoin Takes content of multiple widgets and joins the content and stores it into target GnEditText
gn:act_joinTextualValues Takes content of multiple widgets, joins the text content and stores it into the target
gn:act_lockScreenOrientation Locks screen orientation to desired orientation. Setting lock on orientation will keep the lock until the application is turned off. To remove the lock or switch it to another orientation action needs to be used again with different keyword
gn:act_reloadAutoFilledWidgets Reloads GnEditText widgets that have special ability to autoload data
gn:act_calculate Performs calculation operations on different actors and stores result in target
gn:act_break Action is used to prevent further execution
gn:act_convertTimestampToFormat Action is used to convert timestamp (numerical value) from certain widget to human readable format
gn:act_trigger Action is used to trigger any action set on a different widget
gn:act_resetChrono Action is used to reset the chronometer time to 0
gn:act_startChrono Action is used to start the chronometer to measure time
gn:act_stopChrono Action is used to stop (pause) the chronometer time measuring
gn:act_setChrono Action sets chronometer to certain start time
gn:act_debug Action will dump content of any action that has logging into folder $debug in currently used application root directory
gn:act_debug_print Action used to print source value to logcat
gn:act_setViewState Action will change the state of any widget
gn:act_copyDataFromRow Action will copy data from selected row from GnListView widget to some other widget outside of GnListView widget
gn:act_showDialog Action used to display a popup dialog
gn:act_showDateTimeDialog Action used to display a datetime dialog
gn:act_setSrcImage Action used to change image drawable for specified GnImageView widget
gn:act_smsSend Action used to send an SMS message to multiple recipients
gn:act_sendEmail Action used to send a silent email message to multiple recipients
gn:act_showSingleChoiceDialog Action used to display a single choice dialog
gn:act_showProgressDialog Action used to display a progress dialog
gn:act_hideProgressDialog Action used to hide visible progress dialog
gn:act_changeProgressDialog Action used to change a value of progress dialog
gn:act_showYesNoDialog Action used to display yes, no dialog, with custom title, message , and buttons text
gn:act_enableWidget Action enables widgets for user interaction
gn:act_disableWidget Action disables widgets for user interaction
gn:act_performClick Performs a click action on targeted widget
gn:act_rawQueryToWidget Action is used to query data from database and store value to a target
gn:act_rawQueryToWidgets Action is used to query data from database from multiple columns and store value to multiple targets
gn:act_rawUpdateValues Action is used to update data from source to database record
gn:act_loadPointer Loads value for widget which contains pointer Id
gn:act_scrollTo Automatic scrolling is executed to certain widget on screen
gn:act_getVariable, Loads value of variable from memory and stores it into target , previously known as gn:act_getVariableToWidget (deprecated name)
gn:act_setVariable Loads value from target and stores it to variable
gn:act_resetVariables Resets memory value holders for variables to definedValue values
gn:act_setTimestampToVar Loads special timestamp values to variable which are defined by keywords, or hardcoded value
gn:act_copyDropdownSelectedArrayValue Action is used to retrieve dropdown selected value from array value string-array into target widget
gn:act_rawWriteValues Action is used to write data into database table
gn:act_blinkView Makes a view blink in specific intervals on screen
gn:act_callPhone Performs phone call when action is executed
gn:act_sendEmailIntent Sends email when action is executed
gn:act_rawBulkUpdateValues Updates values to database on multiple rows that are stored in widgets that contain multiple rows , such as GnListView
gn:act_updateLstRowColumnFromWidget Updates value held in widget with rows, row column by value from widget.
gn:act_isIdenticalFile Action that compares if file that is stored on device is identical to file information last stored about the file
gn:act_storeFileInfo Action that stores information about file internally. This information is later used by gn:act_isIdenticalFile action.
gn:act_rawQueryCountToTarget Executes query counts the rows returned and stores result into a target
gn:act_saveToVariable Stores value variable in variables.xml file from target. Values that are stored in variables.xml are loaded into variables on startup of the ginstr application
gn:act_updateUIbreak Breaks execution of the action block if a content update is necessary. The scenario to use this action is when setting some value in same action block into certain widget and in same block executing a decision based on content of that widget
gn:act_playSoundFromTarget When action is executed it plays sound from various sources
gn:act_nfcWidgetSoundChange (DEPRECATED) Action used to change NFC sound from default to custom when NFC tag is scanned.
gn:act_getGinstrUserNameToTarget After login it will retrieve currently logged in user from ginstr launcher and store it to variable
gn:act_startFingerprint Action used to start fingerprint procedure on defined widget with fingerprint capabilities
gn:act_saveQuestionnaire Used exclusively with GnQuestionnaire widget to execute questionnaire saving procedure
gn:act_loadQuestionnaireAsync Used exclusively with GnQuestionnaire widget to asynchronously generate questionnaire
gn:act_loadQuestionnaire Used exclusively with GnQuestionnaire widget to dynamically generate questionnaire
gn:act_addRow Action used to insert new row into target which support rows, rowsColumn & email datatypes
gn:act_removeRow Action used to delete existing row from target which support rows, rowsColumn & email datatypes
gn:act_getRowIndex Returns index of first row with defined values from target which support rows & rowsColumn datatypes
gn:act_updateRow Updates a row by defined column values or specified index on target which supports rows & rowsColumn datatypes
gn:act_getRowValues Returns data from source (supports rows & rowsColumn datatypes) matching row to targets
gn:act_while Action used to repeat the execution of commands, while parameter value is the same as compared value.
gn:act_generateReport Action used to initiate report generation on server side.
gn:act_forEach Used exclusively with variables of rows, rowsColumn, pictures, email datatypes, to repeat the execution of commands, for each element in the list parameter
gn:act_stopFingerprint Action used to stop fingerprint procedure on defined widget with fingerprint capabilities
gn:act_createGinstrShortcuts Action used to generate shortcuts for all installed ginstr apps
gn:act_setAsync Action used to execute additional actions in background thread
gn:act_changeText Action used to change the text value of widget
gn:act_isMiddleRow Action used to check if specific row is not the first or the last row in the list
gn:act_isLastRow Action used to check if specific row is the last row in the list
gn:act_rowsSize Action used to retrieve the number of rows in the list
gn:act_getVariables Action used to retrieve the variable values and stores them in corresponding targets
gn:act_getRow Action used to retrieve the row values from list and stores them in corresponding targets
gn:act_queryBLEFingerprint Action used to return all data for specific user from table which contains BLE fingerprint values.
gn:act_setWinBgd Action used to change current window background.
gn:act_nfcEnabled Action used to enable/disable gn:act_setOnNfc event on all NFC widgets
gn:act_checkDoubleBack Action used to check if the back button is pressed two times in less than 2 seconds.
gn:act_addData Action used to add additional data in existing list
gn:act_getListDifferences Action used to compare two rows and store differences in another row
gn:act_isGPSActive Action used to check if GPS is active
gn:act_toLayoutClick Actions that change displayed root layout to desired target
gn:act_toLayoutLongClick Actions that change displayed root layout to desired target
gn:act_toLayoutSwipe Actions that change displayed root layout to desired target
gn:act_toLayoutItemSelect Opens target layout based on selected item value in selector widget
gn:act_sortListView Action used to sort GnListView data
gn:act_replaceText Action is used to replace text by regular expression pattern and save it again into target
gn:act_renameMediaFile Action is used to rename media files stored in target
gn:act_setDateTimeFormat Action is used to define date time format of value stored in GnChronometer
gn:act_getUserData Action is used to get ginstr user data and store it into target
gn:act_calculateDrivingDistance Action is used to calculate driving distance between two GPS coordinates and store the result into target
gn:act_beep Action is used to play beed sound
gn:act_vibrate Action is used to vibrate the device
gn:act_serialToTarget Action is used to retrieve device serial number into target
gn:act_filterDistinctRows Action is used to remove duplicate rows from target
gn:act_setFormat Action is used to set format of target when target is printed out as string target
gn:act_getTextByRegex Action is used to extract substring or a whole string from a source and store it into target
gn:act_goToLoginScreen Action is used to returns user to Login screen
gn:act_rawDelete Action is used to delete the document from database
gn:act_startTransactionMode Starts transaction mode of saving data to database
gn:act_stopTransactionMode Stops transaction mode of saving data to database
gn:act_setFocus Sets focus on defined widget
gn:act_openAttachmentWithExternalApp Action used to open a document from database in external app
gn:act_getNominatimData Action used extract address parts from NOMINATIM data
gn:act_showAndroidSetting Action used to open android settings
gn:act_service Action used to start and configure a ginstr launcher service
gn:act_addServiceListener Action used to attach a listener to ginstr launcher service
gn:act_updateServiceListener Action used to update a listener of ginstr launcher service
gn:act_removeServiceListener Action used to remove a listener from ginstr launcher service
gn:act_rawQueryUnique (DEPRECATED) Action used to ensure uniqueness of values in ginstr apps
gn:act_getGeofence Action used to support the use of geo-fences in ginstr apps
gn:act_keepScreenOn Action used to keep screen turned on when user is not interacting with it
gn:act_isWIFIActive Action used to check if WIFI is active
gn:act_isNFCActive Action used to check if NFC is active
gn:act_isDATAActive Action used to check if mobile internet is active
gn:act_filterRows Action used to create a filtered list of rows based on some condition from existing collection of rows
gn:act_getAttachmentFromServer Action used to retrieve attachments of a row in table when replication is not enabled for attachments
gn:act_setTextColor Action used to change widget text color
gn:act_createPointer Action used to create a pointer object
gn:act_getAttachmentUrlFromServer Action used to retrieve URL for specific attachment
gn:act_addPointerToAssignment Action used to add pointer to assignment
gn:act_breakPoint Action used to pause the code execution at specified point
gn:act_resumeDeleteRow Deletes last clicked row on all widgets that inherit ExpandedListAdapter
gn:act_stopMediaReproduction Stops reproduction of audio and resets list of played sounds at GnListOfMedia
gn:act_convertHtmlToPdf Converts generated html into a pdf document
gn:act_isRestoreInProgress Checks if the restore mechanism is in progress
gn:act_isWidgetLoaded Checks if the GnQuestionnaire widget is loaded

Pages in category "Action Library"

The following 145 pages are in this category, out of 145 total.

G