Skip to content

ProgressBanner

The progress banner message is like the standard Banner Message action but used to show that another action or set of actions is in progress. It does this by attaching a banner to the app's main navigation bar that contains a progress-indicator image. It also allows the user to define a message to display while running and a message to display upon the action chain's completion. It is more geared towards alerting the user of current long running operations.

Note: Failure handling is disabled for this action type. The reason being that there is no real way to fail a progress banner. For chaining other actions to a the progress banner, the success handler should be used. The success action will be run immediately after the progress banner is displayed. For iOS, The progress banner will stay displayed as long as the chain of actions continues. If the completion message is empty, the progress banner would be dismissed right after the chain of actions is completed. For Android, the initial progress banner will stay displayed as long as the chain of actions continues (same as normal banner with Indefinite duration / 0) with a "DISMISS" button. If no actions are chained to the progress banner, it will move immediately into showing the completion message.

The properties defined in Action are also applicable to this action.

ProgressBanner Properties

Property Type Required Default
ActionLabel string Optional
Animated boolean Optional true
CompletionActionLabel string Optional
CompletionMessage string Optional
CompletionTimeout integer Optional 0
DismissBannerOnAction boolean Optional false
Message string Required
OnActionLabelPress ActionOrRule Optional
OnCompletionActionLabelPress ActionOrRule Optional
_Type const Required

ActionLabel

Label to indicate that progress banner is clickable. On Android, it will be used as button label. On iOS, it will be appended to Message.

  • type: string

Animated

Whether Banner showing is animated. Not supported in Android. The Banner for Android will always gets animated.

  • type: boolean
  • default: true

CompletionActionLabel

Label to indicate that completion banner is clickable. On Android, it will be used as button label. On iOS, it will be appended to CompletionMessage.

  • type: string

CompletionMessage

Message to show upon completion of action chain that will be accompanied with progress indicator indicating completion. If it's too long, it will wrap.

  • type: string

CompletionTimeout

Number of seconds to display the completion message. 0 means do not dismiss until the user does so(except on Android). CompletionTimeout only applies if CompletionMessage is provided.

  • type: integer
  • default: 0

DismissBannerOnAction

Whether to dismiss banner when banner is clicked to perform another action. This is used for both progress and completion banner.

  • type: boolean
  • default: false

Message

Message to show when action is started through completion message that will be accompanied with progress indicator the action is in progress. If it's too long, it will wrap.

  • type: string

OnActionLabelPress

Action/Rule to be triggered when ActionLabel is pressed. This is applicable only when both ActionLabel and OnActionLabelPress are non-empty.


OnCompletionActionLabelPress

Action/Rule to be triggered when CompletionActionLabel is pressed. This is applicable only when both CompletionActionLabel and OnCompletionActionLabelPress are non-empty.


_Type

  • type: const

The value of this property must be equal to:

"Action.Type.ProgressBanner"

Action Result

This action does not have an ActionResult.


Examples

// ProgressBanner.action
{
  "Message": "Sync in Progress.",
  "CompletionMessage": "Sync Complete.",
  "CompletionTimeout": 5,
  "OnSuccess": "/path/to/SyncRuleCode.js",
  "ActionLabel": "$(PLT,'Click to retry.','Retry')",
  "OnActionLabelPress": "/path/to/ConfirmMessage.action",
  "CompletionActionLabel": "$(PLT,'Show details.','Details')",
  "OnCompletionActionLabelPress": "/path/to/ToastMessage.action",
  "DismissBannerOnAction": false,
  "_Type": "Action.Type.ProgressBanner",
}
// SyncRuleCode.js (not needed, but just to show how a rule can be intertwined at any time)
function SyncRule(clientAPI) {
  clientAPI.showProgressBanner("Uploading...");
  return clientAPI.executeAction("/path/to/ODataUpload.action");
}