Template Variables

You can use variables in your workflow template.

Variables take three forms:

  1. Column name variables
  2. Expression variables
  3. Built-in variables

Column name variables allow you to include column data values.  For example, specify <<Order Number>> to include the value of the "Order Number" column. The column name must exactly match the column name in your table. The column name variable is replaced by the value of that column.

Expression variables allow you to compute values. For example, specify <<[Amt]*[Qty]>> to multiply the "Amt" column by the "Qty" column. You can use any AppSheet expression in an expression variable. The expression variable is replaced by the value of the expression.

You can include column values from records that are referenced by the current record. For example, assume the current Order Detail record contains a "Ref" column called "OrderRef" that refers to its parent "Order" record. Assume the parent "Order" record contains column "Order Date". Specify <<[OrderRef].[Order Date]>> to include the "Order Date" column value from the "Order" table.

You can use the value of referenced fields in expressions. For example, you could compute the date seven days after the "Order Date" by using the expression <<[OrderRef].[Order Date]+7>>.

Built-in variables allow you to include built-in values supplied by AppSheet. Built-in variable names always begin with a mandatory underscore. AppSheet supports the following built-in variables:

  • <<_APPID>>: Application GUID (Globally Unique Identifier) that uniquely identifies your application e.g. “8c26466f-1db0-4032-9c0f-40c2a588cf50”.
  • <<_APPNAME>>: The name of your AppSheet application e.g. “Workflow-10301”.
  • <<_APPOWNER>>: The Owner ID of your AppSheet application e.g. “10301”.
  • <<_ATTACHMENTNAME>>: The name given to the attachment.
  • <<_NOW>>: The current date and time e.g. "6/15/2009 1:45:30 PM".
  • <<_ROWKEY>>: The key value of the added, deleted, or updated record.
  • <<_ROW_WEB_LINK>>: URL that refers to the added or updated record in your AppSheet application. For example, you can include this URL in a workflow email to allow the email recipient to easily open the added or updated record. The record key is displayed as the link name.
  • <<_ROW_WEB_URL>>: URL that refers to the added or updated record in your AppSheet application. For example, you can include this URL in a workflow email to allow the email recipient to easily open the added or updated record. The full URL is displayed. We normally recommend using <<_ROW_WEB_LINK>> rather than <<_ROW_WEB_URL>> because the former is more concise.
  • <<_RULENAME>>: Name of your workflow rule e.g. “My Update Rule”.
  • <<_TABLENAME>>: Name of your table e.g. “Orders”.
  • <<_TIMENOW>>: The current time e.g. "1:45:30 PM"
  • <<_TODAY>>: The current date e.g. "6/15/2009".
  • <<_UPDATEMODE>>: The name of the operation that triggered the workflow rule. Namely, “Add”, “Delete” or “Update”.
  • <<_USEREMAIL>>: The current user’s email address e.g. “jmorgan@google.com”.
  • <<_USERNAME>>: The current user’s name e.g. “Julie Morgan”.
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.