DataSnap
The DataSnap field in NileDesk is a specialized dropdown designed to go beyond simple value selection. Unlike a regular dropdown that only stores the chosen value, a DataSnap can fetch, display, and retain multiple related fields from a data source. This makes it a powerful tool for automation, prefilling information, and enhancing workflows within forms.
For example, when selecting a customer from a DataSnap, it can automatically retrieve and store the customer’s address, contact number, and email — making this information immediately available for use in expressions, filters, and calculations across the form.
Key Properties of DataSnap
1. Basic Field Properties
- Field Title – The display name of the field on the form.
- Field ID – A unique identifier for referencing in expressions.
- Helper Text – Instructions or notes shown below the field.
- Conditional Visibility – Rules to show or hide the field dynamically.
2. Data Source Configuration
To set up a DataSnap, the form designer must choose a data source, which can be:
- Process Flow
- Board
- Dataset
- Data Form
After selecting a data source, the designer specifies the primary display field for the dropdown. Then, from the list of available fields in the source, the designer selects which additional fields should be linked and retained whenever a value is chosen.
Functionality of DataSnap
1. Storing Linked Fields
When a user makes a selection, the DataSnap doesn’t just save the displayed text — it also stores all the linked fields defined by the designer. This ensures the system has access to a complete set of related data for downstream use.
2. Using Linked Fields in Expressions
Linked fields can be used in computed expressions to auto-fill other form fields. Example: In an invoice form, selecting a product from a DataSnap can automatically populate its unit price into a price field using an expression like:
product.unit_price
Here, product
is the DataSnap Field ID, and unit_price
is the linked field.
Additional Features
- Displaying Linked Fields on Form – Show linked fields directly below the DataSnap in a gray panel for quick reference without creating extra fields.
- Auto-Selection of First Item – Configure the field to auto-select the first record that matches filters. Designers can also set trigger fields to refresh the DataSnap dynamically.
- Filtering Data – Define conditions to limit displayed options and ensure only relevant data is shown to users.
Validations in DataSnap
DataSnap fields support standard validations such as:
- Equal To / Not Equal To comparisons.
- Ensuring a valid option is selected based on predefined conditions.
Using DataSnap in Filters and Expressions
Because a DataSnap stores multiple linked fields, these appear as expandable structures in filters and expressions.
Example: A DataSnap field named Product
may expand into fields like unit_price
, category
, or stock_status
. These can then be used in calculations, filters, and dynamic form logic.
Best Practices for Using DataSnap
- Use DataSnap when multiple related fields must be fetched along with the selected record.
- If only a single field is required, a Dropdown field is more efficient.
- Minimize linked fields to avoid unnecessary overhead and keep forms lightweight.
- Apply filters to show only relevant data in the dropdown.
- Leverage expressions to auto-populate fields from linked data for smooth automation.
Example Use Cases
Customer Selection
A DataSnap fetches customer details. Selecting a customer automatically fills in the Address field using the expression:
customer.address
Product Selection in Invoices
A DataSnap fetches product details. Selecting a product fills its unit price field automatically.