Client API Reference
Gebra Suite Functions
The Gebra Suite provides a set of functions for each application. These functions can be used inside events, to interact with the app and modify the behaviour of the application.
Common Functions
App Functions
Field Manipulation
addCalendarEventSource(string controlId, eventSource) //eventSource is a JSON Object.
addCalendarEventSource(string controlId, eventSource) //eventSource is a JSON Object.
enableValidator(string controlId, string validatorName, bool enable) // enable can be true(default)/false.
enableValidator(string controlId, string validatorName, bool enable) // enable can be true(default)/false.
getCalcDateTime(inputDate, accuracy) // inputDate can be of Date type or a controlId of date/datetime control and accuracy can be seconds(default), minutes, or hours.
getCalcDateTime(inputDate, accuracy) // inputDate can be of Date type or a controlId of date/datetime control and accuracy can be seconds(default), minutes, or hours.
getSignatureImageBlob(string controlId, string type) // Type can be of png(default) or svg.
getSignatureImageBlob(string controlId, string type) // Type can be of png(default) or svg.
refresh(string controlId) // If used without parameter, refreshes all controls.
refresh(string controlId) // If used without parameter, refreshes all controls.
selectGridRows(string controlId, string columnId, value) // Value can be of any javascript value type i.e. string, integer, Date etc.
selectGridRows(string controlId, string columnId, value) // Value can be of any javascript value type i.e. string, integer, Date etc.
setBackgroundColor(string controlId, string colorName) // colorName can be "default", "primary", "secondary", "success", "danger", or "warning".
setBackgroundColor(string controlId, string colorName) // colorName can be "default", "primary", "secondary", "success", "danger", or "warning".
setControlUnmodifiedValue(string controlId, string valueToCompare) // Value can be of any javascript value type i.e. string, integer, Date etc.
setControlUnmodifiedValue(string controlId, string valueToCompare) // Value can be of any javascript value type i.e. string, integer, Date etc.
setEnable(string controlId, bool visible, string subControl) // visible(default True) and subControl are optional parameters.
setEnable(string controlId, bool visible, string subControl) // visible(default True) and subControl are optional parameters.
setFieldUnit(string controlId, string unitName) // If no value is given for unitName then unit will be removed.
setFieldUnit(string controlId, string unitName) // If no value is given for unitName then unit will be removed.
setFieldValue(string controlId, value) // Value can be of any javascript value type i.e. string, integer, Date etc.
setFieldValue(string controlId, value) // Value can be of any javascript value type i.e. string, integer, Date etc.
setFontStyle(string controlId, string fontStyle) // fontStyle can be italic or normal.
setFontStyle(string controlId, string fontStyle) // fontStyle can be italic or normal.
setFontWeight(string controlId, string fontWeight) // fontWeight can be normal or bold.
setFontWeight(string controlId, string fontWeight) // fontWeight can be normal or bold.
setGridAutoRefresh(string controlId, Number autoRefreshSeconds ) // inputDate can be of Date type or a controlId of date/datetime control.
setGridAutoRefresh(string controlId, Number autoRefreshSeconds ) // inputDate can be of Date type or a controlId of date/datetime control.
setGridGrouping(string controlId, groupConfiguration) // groupConfiguration can either null, undefined or columnId.
setTextColor(string controlId, string colorName) // colorName can be "default", "primary", "secondary", "success", "danger", or "warning".
setTextColor(string controlId, string colorName) // colorName can be "default", "primary", "secondary", "success", "danger", or "warning".
setVisibility(string controlId, bool visible, string subControl) // visible(default True) and subControlare optional parameters.
setVisibility(string controlId, bool visible, string subControl) // visible(default True) and subControlare optional parameters.
showTabPage(string controlId)setGridGrouping(string controlId, groupConfiguration) // groupConfiguration can either null, undefined or columnId.
switchTagControl(string controlId, bool editMode) // editMode is optional parameter.
switchTagControl(string controlId, bool editMode) // editMode is optional parameter.
unselectGridRows(string controlId, string columnId, value) // Value can be of any javascript value type i.e. string, integer, Date etc.
unselectGridRows(string controlId, string columnId, value) // Value can be of any javascript value type i.e. string, integer, Date etc.
Printing and Documents
createReport(reportControlId, createOptions) // CreateOptions is a JSON object. It contains options like print, archive, saveFile etc. for report creation.
print(string controlId) // Id of report control which is to be printed.
printBlob(printDoc) // printDoc is a document which is to be printed.
Data Storage
copyConfigRecordById(string configName, Number recordId, additionalValues) // additionalValues is a JSON object, it contains values need to be modified in target record.
deleteRecord(options) // options is a JSON object which include properties id, noConfirmationMessage.
executeStoredProcedure(string procedureName, procedureParameters, queryOptions) // procedureParameters and queryOptions are JSON objects.
queryStoredProcedure(string procedureName, procedureParameters, queryOptions) // procedureParameters and queryOptions are JSON objects.
refreshDataSource(string controlId) // Refreshes controlId. If used without parameters, it refreshes all controls with datasources.
saveCurrentRecord(string configName, record) // record is a JSON like object.
sqlRead(string statementName, additionalParameters, queryOptions) // additionalParameters and queryOptions are JSON objects.
sqlWrite(string statementName, additionalParameters, queryOptions) // additionalParameters and queryOptions are JSON objects.
Build in Tools
composeEmail(emailOptions) // emailOptions is a JSON object, it contains options like to, cc, bcc, text, and subject etc which can be used to send an email.
downloadAttachments(downloadOptions) //downloadOptions is a JSON object. It includes resquestedIds list and file name for downloaded file.
getCustomMessage(string messageName, params, string targetLanguage) // params is a JSON object.
messageBox(messageBoxOptions) // messageBoxOptions is a JSON object.
replaceText(string text, additionalReplacement) // additionalReplacement is a JSON object with key value pairs.
serverFunction(string funcName, funcParams, options) // funcParams and options are JSON objects and optional parameters.
showAttachments(bool show) // Default show value is is true.
showDiscussion(bool show) // Default show value is is true.
showMessageBox(messageBoxOptions) // messageBoxOptions is a JSON object.
showMessage(messageOptions) // messageOptions is a JSON object.
showWikiPage(string pageName, bool global) // If global is true, global wiki page is shown. Otherwise workspace wiki page is shown.
uploadAttachment(blob data,Number documentTypeId, string fileName) // documentTypeId and fileName are optional parameters.
Bizerba Soap (_connect.BRAIN)
GetConnectInfo -> Get information about the connected devices
GetConnectVersion -> Get the version of _connect.BRAIN
SendMessage -> Send a BxNet command to a device
ReceiveMessage -> Receive the asked information from a device
SendCommand -> Send a IxNet command directly to a device
CreateShipment → Creates a DHL Shipping Label.
GetLabel → Shows the shipment Label again.
Diamant OpenStack
Diamant Transaction
Diamant CloseStack
Starting Apps
addEventListener(string eventName, string controlId,function func) // ControlId is optional parameter.
closePublicAppUrl(options) //options is a JSON object.
createPublicAppUrl(options) //options is a JSON object.
startApp(startOptions) // startOptions is a JSON object with start parameters.
isInitializing
The Api Events are used to react on certain events. This way you can customize the behaviour of the app to your own purpose. Some events will be raised before the app executes their own logic for this event. In that case, you can return 'true' to avoid the app build in event. Otherwise the app will do its own logic after your event.
onAppInitialized → When the app is initialized onAppStart has happend).
onAppStart → When the app is started but befor it is initialized.
onAttachmentDeleted → Triggers when the user deletes an attachment in the sidebar.
onAttachmentsHide → This event occurs when the attachment sidebar gets closed.
onAttachmentsShow → Just before attachments panel opens.
onCellClick → When a grid cell is clicked.
onChange → When a control content is changed.
onChildAppClosed → When a childapp of your app closes.
onClick → When a control is clicked.
onDataTransform → The event can be used to transform a datasource line to a calender event.
onEventChange → The event occurs the user moves or modifies an event.
onEventClick → The event occurs the user clicks on one of the events.
onFileImport → When a file is uploaded for import.
onInlineEdited -> The event occurs when a data cell in a grid has been modified via inline edit.
onKeyDown → When a key goes down
onKeyPress → When a key is pressed
onKeyUp → When a key goes up
onMailHistoryShow → When the sidebar for the mail history opens
onModalClose → When a modal app closes.
onRecordDelete → Before a record is deleted.
onRecordDeleted → After a record was deleted.
onRecordLoad → Before a Record is loaded.
onRecordLoaded → After a Record is loaded.
onRecordNew → After initializing the Form. The new Record is not saved yet but can be modified with initial values.
onRecordSave → Before a Record is saved.
onRecordSaved → After a Record is saved.
onReturnFromModal → When a modal child app is closed, the parent will get this event
onRowClick → When a grid row is clicked.
onRowCreated → Modify a grid row. Apply a color for the row based on its values for example.
onRowSelectionChanged → After a the selected row of a grid has changed.
onScan → When a code is scanned.
onSubDataRequest → When the subdatasource of a control is requested
onTabShown → Fires when a tab page is changing to visible.
onTimeSelected → The event triggers when the users selects a time period in the calendar.
Last updated
Was this helpful?