Table of Contents

 

Query Box

Query Box is used to create a contextual prompt that asks a question to the user and captures a response at runtime. It appears as a dialog box, typically when an action is triggered (i.e. Control Ex attribute at Form Level or Query Box Ex at function level). The Query Box allows developers to seek confirmation, request specific values, or guide user decisions before proceeding further. Through its attributes, the Query Box controls the message displayed, the type of response expected, default values, and how the user’s input influences subsequent processing.

Syntax

[Query Box: <Query Box Name>]

Attributes

A Query Box can contain multiple Query options, each associated with its own hot key and it is internally indexded as 1,2,3 and so on. However, users are naturally habituated to press Enter to proceed and Esc to reject. To ensure this familiar behaviour is preserved and to avoid Tally waiting indefinitely for an explicit key choice, the Default attribute is used.

The Default attribute specifies which Query should be triggered automatically when the user presses Enter or Esc, without selecting any hot key. It accepts index numbers of the Query attributes, where the first parameter corresponds to Enter and the second parameter corresponds to Esc. This ensures predictable flow, consistent user experience, and uninterrupted execution.

Syntax

Default : <Enter Index> : <Escape Index>

where,

<Enter Index> → The option number selected when Enter is pressed.

Example

[Query Box: TSPL Query Box]

Default : 1 : 2

Pressing Enter will automatically pick option 1, while pressing Escape will select option 2, helping control user flow.

Sometimes you really want the user to pause and pay attention. The Gray Background attribute (alias: Grey Background) helps you do exactly that by graying out the rest of the screen and allowing the Query Box to stand out clearly. It accepts a logical value (Yes/No). When this attribute is set to Yes, the user’s focus naturally shifts to the question being asked, making the decision easier and reducing distractions. This is especially useful for confirmations, warnings, or any critical prompt that you don’t want the user to overlook.

Syntax

Grey Background : <Logical Value>

<Logical Value> A logical value deciding whether the background should be grayed.

Example

[Query Box: TSPL Query Box]

Grey Background : Yes

The screen behind the QueryBox becomes grey, helping the QueryBox stand out clearly to the user.

Sometimes you may want the Query Box to appear exactly where the user’s eyes naturally go. The Horizontal Alignment attribute helps you control where the Query Box is positioned horizontally on the screen whether it should appear on the left, right, or center. By choosing the accurate alignment, you can match the context of the screen, improve visual balance, and make the interaction feel more natural and intuitive for the user.

Syntax

Horizontal Align : <Alignment Type>

where,
<Alignment Type> Specifies the horizontal position of the QueryBox.
It takes the following values, Bottom, Center, Centre, Justified, Left, Prompt, Right, Top.

Example

[Query Box: TSPL Query Box]

Horizontal Align : Centre

This places the QueryBox horizontally at the center of the screen, giving it a balanced and visually pleasing placement.

The Query attribute defines an individual option inside the Query Box. It allows you to specify the hotkey the user can press, the text that appears for that option, and an optional description to add clarity. By using this attribute thoughtfully, you can design decision prompts that are clear, meaningful, and easy for users to understand so users know exactly what choice they are making.

Each Query option is internally indexed as 1, 2, 3, and so on. This internal indexing plays a key role in defining the default behaviour for the Enter and Esc keys. By referring to these index numbers through the Default attribute, you can ensure that pressing Enter or Esc triggers the intended option even when the user does not explicitly use a hotkey, resulting in a smooth and predictable user experience.

Syntax

Query : <HotKey> : <Query String> : <Description>

where,
<HotKey> → The key pressed by the user to select the option.

<Query String> → The text displayed for the option.

<Description> → Additional information explaining what the option does.

Example

[Query Box: TSPL Query Box]

Query : Y : “Yes” : “Proceed with TSPL action”

Query : N : “No” : “Cancel TSPL action”

Two options are added in the query box:

Pressing Y selects “Yes” to proceed with the TSPL action.

Pressing N selects “No” to cancel it.
The descriptions help guide the user clearly.

You would want the user to immediately understand why the Query Box has appeared. The Title attribute helps you do that by displaying a clear heading at the top of the Query Box. It sets the context right away, so the user knows what decision is being asked of them, reduces confusion, and makes the interaction feel purposeful and easy to follow.

Sometimes you may want the Query Box to appear exactly where the user’s eyes naturally go. The Vertical Alignment attribute helps you control where the Query Box is positioned vertically on the screen whether it should appear on the top, bottom, or center. By choosing the accurate alignment, you can match the context of the screen, improve visual balance, and make the interaction feel more natural and intuitive for the user.

Syntax

Vertical Align : <Alignment Type>

Where,
Specifies the vertical position of the QueryBox.
It takes the following values, Bottom, Center, Centre, Justified, Left, Prompt, Right, Top.

Example

[Query Box: TSPL Query Box]

Vertical Align : Centre

The QueryBox appears vertically centered on the screen, making it immediately noticeable and easy for the user to interact with.

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