Quota object

Available from version 5.4.4.

In AskiaScript, the quota object is a predefined object that allows you to access information about quotas in your AskiaScript. It is located in the global scope, so is accessible from anywhere in AskiaScript.

For a detailed example of using AskiaScript to set up sophisticated quota management, see the Knowledge Base article Quota logic examples in Design.

See also:

In this topic:

In draft

In draft 

Properties

UseSingleTarget

Use a single target or a min and max target (total).

Returns a Boolean.

Example
Quota.UseSingleTarget '=> Returns True or False

↑ Top of page ↑

IncludeRunningInterviews

Indicates whether running interviews are included or not as completed.

Returns a Boolean.

Example
Quota.IncludeRunningInterviews '=> Returns True or False

↑ Top of page ↑

CheckingType

Returns the quota checking method being used during interviews, as a number.

Returns a Number.

The possible values are as follows:

Example
Quota.CheckingType -> Returns 1 for "As they are at the moment", 2 for "From the beginning of the session" and 3 for "From the start of the interview"

↑ Top of page ↑

Root

The root QuotaLine (total).

Returns a Quota line.

Example
Quota.Root '=> <TODO>

↑ Top of page ↑

Methods

FindByTag(tag)

The QuotaLine found using the Tag.

Returns a Quota line.

Parameter

In the quota view in the supervisor, you can find a column tag with the autopopulated tag. The format of the tag is :

ShorcutOfTheQuestion1:EntryCode;ShorcutOfTheQuestion
ShorcutOfTheQuestion1:EntryCode;ShorcutOfTheQuestion2:EntryCode

You can also decide to overwrite these tags in the interface and put in your own.

Example

Autopopulated tag:

age:1;gender
age:1;gender:1

Modified tag:

youngGender
yougMen
Quota.FindByTag("age:1;gender") '=> <TODO>
Quota.FindByTag("age:1;gender:1") '=> <TODO>

Quota.findByTag("youngGender") '=> <TODO>
Quota.FindByTag("youngMen") '=> <TODO>

↑ Top of page ↑

ToString()

Returns a string which represents the quota object (expressed in JSON format).

Returns a String.

Example
' Output in a single line (broken here for sake of the readability)
Quota.FindByTag("YoungGender").ToString() 
' => [{
TODO::CONTINUE HERE
},{
TODO::CONTINUE HERE
}]

↑ Top of page ↑

TypeOf()

Always returns "quota".

Returns a String.

Example
Quota.FindByTag("YoungGender").TypeOf() ' => "quota" 

↑ Top of page ↑

Create your own Knowledge Base