Revision as of 14:01, 21 October 2022 by Bojan (talk | contribs)
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 Action that selects item in list widget. The list widget must contain data before setSelectedItem is used.
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, assignments 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, assignments 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
gn:act_openGoogleMapsDriveRoute Loads route information from rows and opens google maps with driving instructions based on the route
gn:act_updateWidgetAttribute Action that updates widgets attribute.
gn:act_getLauncherSetting Action that retrieves ginstr launcher setting.
gn:act_resetWidgets Returns widget to default state
gn:act_validators Provides validators manipulation
gn:act_listValidators Lists validators on widgets and their state
gn:act_geocode Gets gps coordinates based on provided address from nominatim server
gn:callWidgetEvent Calls internal widget events if available on widget
gn:act_zoomToSpan Zoom GnMap to all visible elements on the map
gn:act_getMapRoutePath retrieves the route path data from OSRM server
gn:act_fileExists Check if the file exists in appId/userData/attachments directory
gn:act_wakeLock Keeps the device awake
gn:act_createTimestampFromDate converts given date dd,mm,yyyy into a dateTime datatype
gn:act_getHolidaysFor gets generic or company holidays
gn:act_getPhoneSettings gets android device system settings
gn:act_sortCollection sorts data collections by one or multiple criteria
gn:act_convertTimestamp(GPU II) Action that converts timestamp value from the source into timestamp value with specific timezone offest
gn:act_openGPSWithExternalApp Action that sends the gps coordinate to some external app
gn:act_getIIoTApiKeyFromServer(MGIIOT2.6) Action that retrieves IIoT API key from the server
gn:act_getIIoTDeviceInformation(MGIIOT2.6) Action that reads multiple information from the IIoT device
gn:act_getIIoTApiKey(MGIIOT2.6) Action that reads IIoT API key from the IIoT device
gn:act_getIIoTBatteryStatus(MGIIOT2.6) Action that reads the battery status from the IIoT device
gn:act_getIIoTConfigHash(MGIIOT2.6) Action that reads the config hash from the IIoT device
gn:act_getIIoTConfigName(MGIIOT2.6) Action that reads the configuration name from the IIoT device
gn:act_getIIoTGPRSStatus(MGIIOT2.6) Action that reads the GPRS status from the IIoT device
gn:act_getIIoTLoRaStatus(MGIIOT2.6) Action that reads the LoRa status from the IIoT device
gn:act_getIIoTProcessorId(MGIIOT2.6) Action that reads the processor id from the IIoT device
gn:act_getIIoTRTC(MGIIOT2.6) Action that reads the RTC from the IIoT device
gn:act_getIIoTSerialNumber(MGIIOT2.6) Action that reads the serial number from the IIoT device
gn:act_identifyIIoTDevice(MGIIOT2.6) Action that identifies the IIoT device
gn:act_resetIIoTDeviceToFactorySettings(MGIIOT2.6) Action that resets the IIoT device to factory state
gn:act_setIIoTApiKey(MGIIOT2.6) Action that writes the IIoT API key to the IIoT device
gn:act_setIIoTConfigFile(MGIIOT2.6) Action that writes the configuration file to the IIoT device
gn:act_getIIoTModel(MGIIOT2.6) Action that reads the model id from the IIoT device
gn:act_disconnectIIoTDevice(MGIIOT2.6) Action that closes the connection to the IIoT device
gn:act_setIIoTConfigName(MGIIOT2.6) Action that writes the configuration file name to the IIoT device
gn:act_enableIIoTDeviceDeepSleep(MGIIOT2.6) Action that sets the device into deep sleep
gn:act_enableIIoTDeviceSleepConfigMode(MGIIOT2.6) Action that sets the device into sleep config mode
gn:act_updateIIoTDeviceFirmware(MGIIOT2.6) Action that starts update firmware process manually
gn:act_executeIIoTDeviceCommand(MGIIOT2.6) Action that sends IIoT command via REST API to backend
gn:act_isBLEActive(MGIIOT2.6) Action used to check if BLE is active
gn:act_getIIoTWiFiStatus(MGIIOT2.6) Action that reads the WiFi status from the IIoT device
gn:act_getIIoTBleStatus(MGIIOT2.6) Action that reads the BLE status from the IIoT device
gn:act_getIIoTConfigFile(MGIIOT2.6) Action that reads the config file from the IIoT device
gn:act_getIIoTStatusButtonState(MGIIOT2.6) Action that reads the button state from the IIoT device
gn:act_increment(MGIIOT2.6) Action that increments the value by a defined step
gn:act_enableWidgetEvent(MGIIOT2.6) Action that enables widget events triggering
gn:act_disableWidgetEvent(MGIIOT2.6) Action that disables widget events from triggering
gn:act_getAndroidBatteryLevel(TU1) Action that retrieves the remaining battery capacity as an integer percentage of total capacity (with no fractional part).
gn:act_currentScreenIdVar(TBD) Action that stores the id of the "current screen" tracking variable.
gn:act_lastScreenIdVar(TBD) Action that stores the id of the "last screen" tracking variable.

Pages in category "Action Library"

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

(previous page) (next page)


(previous page) (next page)