Promise
The promise.
OnSuccess
A formula fragment that is run if and when the given promise succeeds. If the promise returns a result, this result is available under the name Result .
OnFailure
A formula fragment that is run if and when the given promise fails. An error is available under the name Error . Refer to the documentation for the action function returning the promise to learn what information is available on the error.
Returns
The promise given as the first parameter.
Waits for a promise to return a response before running an action. This function can only be used from an action formula. AWAIT and other similar functions are used to take action when a promise succeeds or fails.
The first parameter to AWAIT must be a promise . A function returning such a value promises to return a value at some point in the future, or at the very least indicate whether the operation the function started was successful. A promise either succeeds or fails, and it can only succeed or fail once.
AWAIT runs the formula fragment given as its second parameter when, and if, the promise succeeds. If the promise returns a result, it is available to the second parameter under the name Result .
AWAIT runs the formula fragment given as its third parameter when, and if, the promise fails. The third parameter to AWAIT has access to more information on the error which caused the failure, in the form of a value named Error .
If an action should be taken when a promise fails, but no action should be taken when it succeeds, BLANK () BLANK () can be given as the second parameter.
AWAIT waits for the promise given to it to either succeed or fail before running either of its formula fragments. If two actions should be invoked one after another, use ;;; instead.