Model Conditions / Querying Actions¶
This group includes actions that limit the data displayed on the page or load more data into the page. Many govern model conditions, which can be paired with query actions to refresh the data after updating those conditions. There are also actions for searching and sorting models.
Activate/set model condition¶
This action sets the value for a mode condition and then activates it.
Note
To display new data after conditions have been deactivated, use in conjunction with the Query model or Query models actions.
Model: The model which has the condition.
Condition: The name of the condition to activate.
Note
There must be a condition on the designated model for this action to function.
Field value source:
Single specified value:
- Value: The value to be passed to the field that triggers the condition.
Blank value: Sets the field value to blank.
Result of a formula: Inserts the result of a formula in the selected field.
Field from another model:
- Source model: The model where the desired field is located.
- Source field: The field containing the value that, once passed in, triggers the condition.
Page/URL parameter value:
- Parameter: The page or URL parameter the field must equal to trigger the condition.
Skuid user attribute:
- Skuid user attribute: The user attribute that triggers the condition.
Data source user attribute:
- Data source: The data source containing the desired user attribute.
- Data source user attribute: The data source attribute to be passed into the selected field that will trigger the condition.
Update personalization: If enabled, changes to the condition value will persist on the next page load.
Deactivate model condition¶
Deactivates an existing, active model condition with a state that was set to Filterable default on or Always on. This action can also deactivate a condition that has been turned on by a previous Activate model condition action.
Note
To display new data after conditions have been deactivated, use in conjunction with the Query model or Query models actions.
Model: The model which has the condition.
Condition: The name of the condition to deactivate.
Note
- There must be a named condition on the designated model for this action to function. Only conditions with the state set to Filterable default on or Filterable default off can be given a Condition Name.
- Because of some differences under the hood, unchecking an item in a filter does not trigger the event associated with Deactivate model condition. Therefore, when a filter is unchecked at runtime, any actions listening for that event will not run.
Update personalization: If enabled, changes to the condition value will persist on the next page load.
Deactivate filterable conditions on models¶
Deactivates all model conditions set as Filterable default on or Filterable default off on one (or more) models.
- Deactivate filterable conditions on: Then name of the models to deactivate conditions on.
- Update personalization: If enabled, changes to the condition value will persist on the next page load.
Note
- To display new data after conditions have been deactivated, use in conjunction with the Query model or Query models actions.
- Because of some differences under the hood, unchecking an item in a filter does not trigger the event associated with Deactivate filterable model conditions. Therefore, when a filter is unchecked at runtime, any actions listening for that event will not run.
Query models¶
Like Query model, Query model queries the objects that the selected models are attached to. As a result, updated data displays across all components attached to the selected models.
- Models to query: Select models to query.
- Query behavior:
- Standard - Completely replace data: Overwrites the data in the model with the new data received by the query.
- Get more - Merge in new rows with old: Leaves the existing data in the model, but adds any new records found by the query.
- Named outputs: Re-use the output of the models query in subsequent actions via the $Output merge variable. The output of a models query will be the modified or new rows returned in the query. The named output will only be available for subsequent actions in this series or sequence of actions.
If the name of the output were Q_Rows, then following actions may access these rows using {{$Output.Q_Rows.<model_id>.<row_number_in_returned_results>.<field_name>}}.
Note
To display a message if there is a problem with the query, click
Add on-error Action. Create an error Message and select a Timeout (seconds) to determine how long the message displays.Search model¶
Searches all text fields for a specific text string. This action is the only way to immediately filter by a text string other than having end users search within a Search or Table component. It requires no conditions to be set or activated to function.
When this action runs, the model’s text fields are searched, and the model requeried, displaying only the rows of data that match the search text string.
Note
Searches are not tokenized, which means that if the search text contains multiple words, Skuid only returns results that match the exact text (in that order) in the search text field. An untokenized search for “George Washington” returns only records with “George Washington” exactly, not records with “George” and “Washington”, “George Michael Washington,” and “Washington, George.”
Model: The models to search.
Search method: Determines if a search will query the server and filter its data, or filter local data on the client.
Server (default): Returns search results from all data on the server.
Client: Returns search results from only the data that is currently loaded on the page. Large data sets may require lengthy time to filter. If end users commonly need to sort only the data they have loaded within the page—as opposed to every record on the server—this property may speed the filter process.
Warning
If the server contains a large data set not yet loaded into the page, but Search Method is set to Client, the filter may return incomplete results because it’s filtering incomplete data. This may result in unexpected omissions.
Search text: The text string to search with.
Note
Search Text is compatible with merge syntax.
Clear search on models¶
Resets all search boxes on any components attached to the specified models.
Note
This action does not affect the Search component itself because Search components retrieve information from return objects instead of models.
- Clear search on: The models to remove all searches for.
- Update personalization: Determines whether or not that the clearing of search boxes caused by this action is stored in the Personalization Framework—meaning the end users cleared searches will persist when the page is refreshed.
Sort model¶
Sorts a model by a specific field. This sorting will apply to all components connected to the model.
Note
This action will override any sort commands within the model’s Fields to order records by property.
- Model: The model to be sorted.
- Field: The field to sort by.
- Sort behavior: Determines how the sort is applied:
- Cycle sort: Cycles through all sorting methods, looping in the following order: Ascending > Descending > None
- Ascending: Records of higher “value”—alphabetically or numerically—appear at the bottom of the record list.
- Descending: Records of higher “value”—alphabetically or numerically—appear at the top of the record list.
- Clear sort: Any sort applied to the model, including on applied by a model property, is cleared.
- Sort client Side: Determines whether the sorting is done on the client or server side. When enabled, only the rows that currently exist within the model are sorted (client side). This contrasts with sorting on the server side, where all records in the object are queried and sorted on the server by the selected field.
- Query after setting sort: Determines whether a model should immediately requery and display newly sorted data or not. Unless there are more model data actions to be performed, it is typically recommended to leave this property enabled.
- Update personalization: If enabled, changes to the condition value will persist on the next page load.