# Parallel Select

The block allows for pseudo-parallel execution of one of the blocks directly connected to its outputs, selecting the block that does not encounter an error, and after the successful execution of such a block, continues the workflow. A connected block is considered successfully executed if it does not raise an error (exception). The "On Error" connector for all directly connected blocks must remain empty.

<figure><img src="https://3212714295-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FI0zUnKkOuy6lWt7DZ46u%2Fuploads%2Fgit-blob-79307b4d67c8fdeed6d2f5cdabbd715a6e9e43ad%2F%D0%BF%D0%B0%D1%80%D0%B0%D0%BB%D0%BB%D0%B5%D0%BB%D1%8C%D0%BD%D1%8B%D0%B9%20%D0%B2%D1%8B%D0%B1%D0%BE%D1%80.png?alt=media" alt=""><figcaption></figcaption></figure>

If none of the blocks directly connected to the outputs executed successfully (all blocks raised an exception), attempts to execute these blocks are repeated until one of the blocks executes successfully or until a timeout occurs. Popular use cases include waiting for one of several selectors to appear on the screen (it is necessary to connect "Wait for Appearance" blocks to the outputs), waiting for files to appear in folders, etc.

If the connected block has its own customizable timeout, it is recommended to set it to the minimum possible value.

An example of using this block is presented in the following video:\
<http://sherparpa.ru/videos/ru/parallelselect.mp4>

<table data-header-hidden><thead><tr><th width="248" valign="top"></th><th width="297" valign="top"></th></tr></thead><tbody><tr><td valign="top">Timeout</td><td valign="top">[Number] The maximum timeout for executing blocks in seconds.</td></tr><tr><td valign="top">Selected Block</td><td valign="top"><p>[Number] Returns the number of the executed block. The number starts from 1 and corresponds to the connector number.</p><p>If the status is zero, then the timeout for the block has expired and none of the connected blocks were executed successfully.</p></td></tr><tr><td valign="top">Message Level</td><td valign="top"><p>Select the message level that the blocks will output during execution. Possible values:</p><ul><li>"Default" - by default;</li><li>"Release" - output is disabled;</li><li>"Debug" - outputs main information;</li><li>"Detailed" - outputs detailed information.</li></ul><p>If "Default" is selected, the value from the "Start" block of this diagram will be used.</p></td></tr></tbody></table>
