Table of Contents

 

Progress Bar

The Progress Bar definition enables application developers to configure all essential elements required to display a meaningful progress window during long-running operations. Through this definition, developers can specify the Activity Name, Context, Process Name, Progress Indication, and Stages, ensuring that users receive clear, structured, and real-time feedback while a task is being executed. By defining these attributes, the progress bar becomes an informative and interactive component that reflects both the nature and advancement of the underlying process.
While the Progress bar definition gives the outlook, the actual process happens in the function where the progress bar is used and any process like creating data or importing data or uploading data or anything that comes into the purview of a process having a start and finish happens. Function actions like For Initialize ProgressBar and Finalize ProgressBar that starts and ends showing the progress, ProgressBarSetActiveStage to initiate the current stage, ProgressBarUpdateTotalCount for setting the total items to be processed for the stages from stage 2(For stage 1 its taken from Total Count attribute unless overriden by this action), ProgressBarSetItemsDone and ProgressBarUpdateProgressIndication to indicate the items done processing and to show the progress.

Syntax

[Progress Bar : <Progress Bar Name>]

Example

[Progress Bar : TSPL Progress Bar]

 

➥ Download the ProgressBar Sample

 

Attributes

The Activity Name attribute defines the primary task or operation being performed and is displayed prominently within the progress bar interface. It communicates to the user what process is currently in progress, such as data import, item creation, or voucher processing. Since the progress bar becomes meaningful only when associated with a clearly identifiable activity, this attribute is mandatory for every Progress Bar definition. Without it, the system cannot convey the context of the ongoing task, making the progress indicator incomplete. By specifying a descriptive activity name, developers ensure clarity and user awareness during long-running or multi-stage operations.
Note that, this progress bar is actually put into use in a function to show the progress of a process, and once the progress bar is initiated with the function action InitializeProgressbar, the action ProgressBarUpdateActivityName can be used to override the activity name at any point.

Syntax

ProgressBar Activity Name: <Activity Name>

<Activity Name> is to specify the activity name for progress bar (string).

Example

[Progress Bar : TSPL Progress Bar]

    Activity name : Stock Item Creation (400 Nos)

Explanation

The attribute Activity Name specifies the task or process that is currently being executed and shown to the user through the progress bar.
Here, the Activity Name is set as “Stock Item Creation (400 Nos)”, which means when the progress bar is displayed, it will show this message to the user — indicating that 400 stock items are being created.

The Context attribute specifies the operational area or module in which the progress bar activity is taking place, and this information is displayed to the user during execution. While the Activity Name communicates what task is being performed, the Context provides clarity on where that task belongs, such as Item Master, Ledger Master, or Voucher Processing. This helps users understand the functional scope of the operation, especially in environments where multiple processes may be running. Although not mandatory, defining a clear context enhances transparency and improves the interpretability of the progress indicator within the Tally interface.
Note that, this progress bar is actually put into use in a function to show the progress of a process, and once the progress bar is initiated with the function action InitializeProgressbar, the action ProgressBarUpdatecontext can be used to override the context name at any point.

Syntax

 Context: <Context Name>

<Context Name> is to specify the context name for progress bar (string).

Example

[Progress Bar : TSPL Progress Bar]

   Activity name: Stock Item Creation (400 Nos)
   Context      : Item Master

Explanation

In this example here, the value specified in the attribute context– “Item Master” indicates that the progress bar is associated with operations related to Item Master, ensuring that the progress shown corresponds to that activity only.

The Note attribute is used to display an informational message or remark within the progress bar window. This message can provide additional context, guidance, or clarifications related to the ongoing process, such as warnings, instructions, or descriptive text. This is an optional attribute, but if you use it, it will provide the user experience by offering supplementary information that supports a better understanding of the operation being performed.
This attribute is supported from TallyPrime Release 7.0 onward; using it in earlier releases will result in an error message stating “Incorrect Attribute Note is defined.”
Note that, this progress bar is actually put into use in a function to show the progress of a process, and once the progress bar is initiated with the function action InitializeProgressbar, the action ProgressBarUpdatenote can be used to override the Note at any point.

Syntax

Note : <Note String>

<Note String> is to specify the note string for progress bar.

Example

[Progress Bar : TSPL Progress Bar]

   Activity name: Stock Item Creation (400 Nos)
   Context      : Item Master
   Note         : Creating a stock item

Explanation

In this example, a progress bar named TSPL Progress Bar is defined with an Activity Name indicating that 400 stock items are being created, and the Context set to Item Master. The Note attribute adds an informational message, “Creating a stock item”, which will be displayed within the progress bar window to give users additional clarity about the ongoing task.

The Process Name attribute identifies the specific process or step being executed within the overall activity and displays this information in the progress bar. While the Activity Name conveys the broader task, the Process Name highlights the current operation or phase, helping users understand the exact stage of execution such as “Validating Data,” “Creating Entries,” or “Generating Summary.” This attribute enhances the granularity and clarity of the progress bar by providing step-level visibility, especially in multi-stage or iterative operations. Although optional, specifying a process name significantly improves user comprehension and monitoring during long-running tasks.
Note that, this progress bar is actually put into use in a function to show the progress of a process, and once the progress bar is initiated with the function action InitializeProgressbar, the action ProgressBarUpdateProcessName can be used to override the Process name at any point.

Syntax

 Process Name : <Process Name>

<Process Name> is to specify the process name for progress bar (string).

Example

[Progress Bar : TSPL Progress Bar]

   Activity name: Stock Item Creation (400 Nos)
   Context      : Item Master
   Subcontext   : Creating Item Masters
   Total count  : 100
   Stages       : Batch-1 (0 – 100), Batch-2 (101 – 200), Batch-3 (201 – 300), Batch-4(301 – 400)
   ProcessName  : “Creating Summary”

Explanation

The ProcessName attribute specifies the name of the process that is currently being executed and displayed within the progress bar.
Here, the value “Creating Summary” indicates that the progress bar represents the process of creating a summary during the stock item creation activity.

The Progress Indication attribute defines the exact text or message that appears within the progress bar to reflect real-time progress. It is typically used to display dynamic values such as items processed, records created, or percentage completed allowing users to monitor the operation more meaningfully. By combining expressions or variables, developers can present context-rich updates like “Created: 25” or “Processed: 80%.” Although optional, this attribute significantly enhances user visibility and feedback during long-running or multi-step tasks, making the progress bar more informative and interactive.
Note that, this progress bar is actually put into use in a function to show the progress of a process, and once the progress bar is initiated with the function action InitializeProgressbar, the action ProgressbarUpdateProgressIndication can be used to override the progress indication message at any point.

Syntax

Progress Indication : <Progress Indication Name>

<Progress Indication Name> is to specify the progress indication string for progress bar.

Example

[Progress Bar : TSPL Progress Bar]

    Activity name       : Stock Item Creation (400 Nos)
    Context             : Item Master
    SubContext          : Creating Item Masters
    Total count         : 100
    Stages              : Batch-1 (0 – 100), Batch-2 (101 – 200), Batch-3 (201 – 300), Batch-4(301 – 400)
    ProcessName         : “Creating Summary”
    Progress Indication : $$Sprintf:”%s %s”:(“Created :”):##StkItemcount

Explanation

The Progress Indication attribute defines the text or message shown inside the progress bar to indicate the current status or count of progress.
Here, the expression, $$Sprintf:”%s %s”:(“Created :”):##StkItemcount, dynamically displays the number of stock items created so far.
So, as the process runs, the progress bar will show a message like “Created : 45”, helping users clearly track how much of the task has been completed in real time.

The Stages attribute defines the set of sequential phases that make up the overall progress of an operation. Each stage represents a distinct range of work, allowing the progress bar to visually segment the activity into meaningful steps, for example, Batch-1 (0–100), Batch-2 (101–200), and so on. To render stage-based progress visually, at least two stages must be specified; otherwise, the progress bar cannot display segmented progression. By structuring the activity into stages, developers can offer users clearer insight into how the task advances through its lifecycle, especially in multi-batch or multi-phase operations.
Note that, this progress bar is actually put into use in a function to show the progress of a process, and once the progress bar is initiated with the function action InitializeProgressbar, the action ProgressbarUpdateSetactiveStage is used to change from one stage to another(Not mandatory to set for stage 1).

Syntax

Stages : <Stage 1 Label>, <Stage 2 Label>, <Stage 3 Label>……….

<Stage 1 Label>, <Stage 2 Label>, <Stage 3 Label>…… is to provide labels to show the purpose of each stage in the progress bar.

Example

[Progress Bar : TSPL Progress Bar]

    Activity name: Stock Item Creation (400 Nos)
    Context      : Item Master
    Subcontext   : Creating Item Masters
    Total count  : 100
    Stages       : Batch-1 (0 – 100), Batch-2 (101 – 200), Batch-3 (201 – 300), Batch-4(301 – 400)

Explanation

The stages divide the overall process of Stock Item Creation (400 Nos) into four batches, each handling a set range of items. As specified by the Stages attribute, when stage  runs Batch-1 (0 – 100) is shown on the screen, when stage 2 runs Batch-2 (101 – 200) is shown on the screen, when stage 3 runs Batch-3 (201 – 300) is shown on the screen and when stage 4 runs Batch-4(301 – 400) is shown on the screen.
This allows users to easily identify which stage the process is currently in and how much of the overall task has been completed.

The SubContext attribute provides an additional layer of detail about the operation being performed and is displayed alongside the main context within the progress bar. While the Context identifies the broader functional area, the SubContext highlights the specific task or subset of work occurring within that area such as “Creating Item Masters” under the Item Master context. This attribute helps users understand the exact focus of the current process, offering greater clarity during multi-step or module-specific operations. This attribute too is an optional one but defining a subcontext enhances transparency and improves the user’s grasp of the activity being executed.
Note that, this progress bar is actually put into use in a function to show the progress of a process, and once the progress bar is initiated with the function action InitializeProgressbar, the action ProgressBarUpdateSubContext can be used to override the SubContext at any point.

Syntax

 SubContext: <Subcontext Name>

<Subcontext Name> is to specify the sub-context within the progress bar.

Example

[Progress Bar : TSPL Progress Bar]

   Activity name : Stock Item Creation (400 Nos)
   Context       : Item Master
   SubContext    : Creating Item Masters

Explanation

Here, in the progress bar, TSPL Progress Bar, the Context is Item Master, representing the overall category of the activity, while the SubContext — Creating Item Masters — clarifies the exact task being performed within that context.

The Total Count attribute specifies the total number of items or units to be processed during the first stage of execution of the progress bar. Since the progress bar relies on this count to determine the count for the initial stage of activity, the attribute is mandatory. In scenarios where the exact number of items is not known beforehand, the value may be set to 0, allowing the progress bar to function without predefined limits. Defining the total count helps ensure provide the initial stage progress. For the rest of the stages the count is set in the ProgressBarUpdateTotalCount action in the function where the progress bar is actually used. Both of these together give a measurable, meaningful progress of the activity to the users.
Note that, this progress bar is actually put into use in a function to show the progress of a process, and once the progress bar is initiated with the function action InitializeProgressbar, the action ProgressBarUpdateTotalCount can be used to override the Total Count even for the first stage. Also whenever a new stage is initialised with the action ProgressbarUpdateSetactiveStage, it is necessary to specify the total count using action ProgressBarUpdateTotalCount as internally the count is set to 0.

Syntax

Total Count : <Total Steps Count>

<Total Steps Count> is to specify the total count of processed items for the first stage.

Example

[Progress Bar : TSPL Progress Bar]

   Activity name : Stock Item Creation (400 Nos)
   Context       : Item Master
   Subcontext    : Creating Item Masters
   Total count   : 100

   Stages        : Batch-1 (0 – 100), Batch-2 (101 – 200), Batch-3 (201 – 300), Batch-4(301 – 400)

 

Explanation

The example shows a progress TSPL Progress Bar, where there are 4 stages as defined by the stages attribute. With the specification of Total Count attribute the total number of items or units to be processed during the first stage of execution of the progress bar is defined. For the rest of the stages the count is set in the ProgressBarUpdateTotalCount action in the function where the progress bar is actually used. Both of these together give a measurable, meaningful progress of the activity to the users.

 

Is this information useful?
YesNo
TallyHelpwhatsAppbanner
Is this information useful?
YesNo
TARA