Timer Start: the number of choices

Timer Start: the number of choices

タイマー開始: 選択肢数

This item periodically starts processes with the number of choices. Each select type data item of each process will be set each choice.

Basic Configs
Step Name
Note
Auto Step icon
Configs for this Auto Step
conf_idData
C1: Select type Data item *

Notes

  • You can set multiple schedules on a Timer
  • The number of Processes that can be started simultaneously is limited to 100
  • Cannot be used when the choice of the specified select-type data item is via HTTP

Capture

See Also

Script (click to open)
  • An XML file that contains the code below is available to download
    • num_of_choices.xml (C) Questetra, Inc. (MIT License)
    • If you are using Professional, you can modify the contents of this file and use it as your own add-on auto step

/**
 * @param {number} limit 選択肢数の上限
 * @returns {Array} items 選択肢の値一覧
 * @returns {string} items[].id 選択肢の値
 */
const list = (limit) => {
    const def = configs.getObject("conf_idData");
    const choices = itemDao.findAll(def);
    if (choices.size() > limit) {
        throw new Error(`The number of choices ${choices.size()} exceeds the limit ${limit}.`);
    }
    const items = [];
    choices.forEach(item => {
        items.push({
            id: item.getValue()
        });
    });
    return items;
};

Discover more from Questetra Support

Subscribe now to keep reading and get access to the full archive.

Continue reading

Scroll to Top