DataVoke API

This is the library of Client API Functions that wrap internal client objects and properties to make it efficient and safe for a designer to write JavaScript extensions for the DataVoke client.

API Function Short Description
api.openViews
 allOpenViews Returns a dictionary of all open top-level views.
 current Returns the currently focused top-level (windowed) view.
 first Returns the first top-level view in the list of open views.
 last Returns the last top-level view in the list of open views.
 findByID Returns the view that matches the view ID specified from the list of open views.
 findByUID Returns the view that matches the view UID specified from the list of open views.
 findByLinker Returns the view that matches the linker object specified from the list of open views.
 findByName Returns the view that matches the name specified from the list of open views.
View
 addRecord Adds a record to the view (visual location is dependent on sorting).
 executeActionChain Used to execute an action chain by ID on the current view reference.
 kids Contains an array (NOT dictionary) of children views embedded inside this view.
 name Returns the internal name of this view.
 records Exposes a dictionary of records that are in the view (may not match the display order).
 refreshData Used to do a full refresh of the data on the current view using the current view-level filters.
 removeRecord Used to remove selected record(s) from the view. These records will NOT be deleted.
 saveIsRequired Used to determine if a save is required for the current view (i.e. data has changed).
 selectedRecord Gets or sets the current record selection in the view.
 selectedRecords Gets the currently selected records in the view.
 selectFirst Selects the first record in the view (as displayed).
 selectLast Selects the last record in the view (as displayed).
 selectNext Selects the next record in the view (as displayed).
 selectPrev Selects the previous record in the view (as displayed).
 save Used to save the data on the current view that has not been committed yet.
 title Used to do a full refresh of the data on the current view using the current view-level filters.
Record
 recordID Returns the local database ID of this record.
 saveIsRequired Used to determine if a save is required for the current record (i.e. data has changed).
 values Exposes a dictionary of values for the parent record (may not match the display order).
Value
 formattedValue Returns the calculated display value (as seen in the interface).
 status Returns the status object of this value.
 saveIsRequired Used to determine if a save is required for the current record (i.e. data has changed).
 value Gets or sets the raw underlying value.
 valueID Returns the local database ID of this value.


Once you've acquired the UIDs and decided which commands you need to execute, you can construct JavaScript for use in DataVoke.

Add your JavaScript to a button with the Run JavaScript action.

Add your JavaScript anywhere the Expression Editor is available.

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.