Dynamic Options & Inputs
Learn how to build and customize your Rewst Forms
Last updated
Learn how to build and customize your Rewst Forms
Last updated
Feedback
⬆️ CannyCopyright © 2024 Rewst
Check out our elective video on using Options Generators here!
Within the forms section of Rewst, you will find the form builder. This page provides an overview of the tools and options available for creating dynamic forms.
The fields found on the left of the form builder are generally self-explanatory. An important field to note is the "dropdown" field, allowing linking directly to specific workflows and presenting real-time information to your users.
Dynamic options enhance form functionality by enabling real-time information retrieval.
There are two types of Dynamic options, Integration Reference
or Workflow Generated
, let's go into the use cases and differences between each in the below sections:
A reference option is a dynamic field pulled directly from predefined actions. It works well for straightforward data retrieval but may require conversion to a workflow-generated option for data manipulation, as this doesn't give any filtering options and will pull directly from the API endpoint.
Selecting the Microsoft Graph
integration to list all Users
.
If you want more flexibility around the output of the data your user is seeing, you may need to opt for a Workflow Generated option instead, which allows for data manipulation using Jinja.
This setup requires the workflow to be an options generator. See the Workflow Generated Options page for more details on this functionality.
In this image, we can see that what is shown to the user is what is set as the label
for the list contents. Ultimately it can be whatever you want it to be, using Jinja to manipulate that output correctly. The ID
is the value or unique ID of what you're referencing that the workflow is referencing for its future actions.
Default options can be selected for a form field linked to a workflow by following these steps:
Add a boolean property to each option result.
Define the boolean property for the Default Selected Field
value.
Sample data returned by a workflow:
Fields to be filled out in the form:
Value Field: id
Label Field: label
Default Selected Field: current_default
Workflow inputs in Rewst offer a flexible way to define specific inputs to a workflow via a form. This functionality allows you to handle various client cases and attributes dynamically. By understanding these concepts and utilizing the provided examples, you can create versatile and dynamic forms tailored to your specific needs.
Below are some key aspects of workflow inputs:
If you have a form utilized across multiple clients, each with distinct environments like M365 or On-Prem, you can use an Org Variable to dictate the source of the data.
Example: By employing {{ ORG.VARIABLES.primary_identity_provider }}
, which is set per client as either on_prem
or azure_ad
, you can use the same form for both client cases. The form will be pulled from the relevant system.
Instead of creating separate workflows for various attributes (department
, userPrincipalName
, id
, etc.), you can use a single workflow with a hard-coded element. This approach takes your input and returns the desired property.
Example: The attribute department
can be hard-coded to allow a single workflow to handle different returned properties, as shown in the image above.
Here's a Jinja code snippet for achieving this:
Understanding how to test a form can sometimes be confusing due to its intrinsic link to a workflow. To get the Form URL for testing:
Locate the trigger on the workflow.
Click the blue button to view the URLs.
Select the desired organization's form from the list.