An action that lets you create new tokens into the current execution context. The value of each token is usually a computation of other tokens from the context. Once created, the new tokens can be accessed by any subsequent action.
Typical Use Cases
- Generate a new token
- Concatenate 2 tokens
- Overwrite a token
- Initialize variables with empty strings
Don't use it to
- Execute the same token multiple times, in case the token contains other tokens inside - use Apply Tokens instead
- Create a token that is used in another execution context - store the data in a hidden field, cookies or server session instead
- Store data in Entities
|Run SQL Query||Executes an SQL statement and captures the output, so you can create tokens derived from the data returned by the SQL query.|
Input Parameter Reference
|Token -> Value||The value that you want to assigne to the created token.||Yes|
Output Parameters Reference
|Token -> Name||The token name(s) in which the response is to be stored for further use.|
1. Inject data using Run SQL Query
The action below counts the total number of users from users database using Run SQL Query and appends the token for user experience purposes. Import it into your application to see it in action.
2. Generate a new token
The action below logs a debug message only if injected data is true. Import it into your application to see it in action.
3. Concatenate 2 tokens
The action below extract "FirstName" and "LastName" from users database and concatenate them so that "FullName" can be used in the form. Import it into your application to see it in action.
4. Overwrite a token
The action below creates a token with different value depending on logged in user role, the default value being admin role. Import it into your application to see it in action.