# Complete Enrollment

Let's consider an example of a robot designed for the automatic processing of documentation upon the completion of a course by students (listeners). The input data for this robot is a registry of previously enrolled students (listeners). In addition to the order of course completion and the certificate of course completion, the robot prepares the regulatory form of the FRDO registry for each student, as established by law. This process is often used in educational institutions and recruitment agencies.

The robot project consists of four diagrams and four files, two of which are in xlsx format, and the others are in docx format. To describe it step by step, this robot works as follows:

1. Loads the template “P1\_Education\_template.xlsx”
2. Iterates through the cells with the order number.
3. Proceeds to the scenario from the “CompleteEnrollmentProcessCreateWord” diagram, which inputs data into "P1\_Order Completion Template.docx"
4. Proceeds to the scenario from the “CompleteEnrollmentPrintCertificate” diagram, which fills out "P1\_Certificate Template.docx" and sends it to print.
5. Proceeds to the scenario from the “CompleteEnrollment\_CreateFRDO” diagram, which fills out "P1\_FRDO Registry Form.xlsx" and sends it to the specified email.

**Main Project Diagram**

The main project diagram looks like this (for convenience, the diagram blocks are numbered):<br>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXc4mza7KawzH7GKyk0AZBkpau0Ph9Cu4LbtQEV2-Tzv38QXyWCFc1e5f97L9sljKAcHwNrCMUAshFjsg66w-9_kMKiBK_Na3LqMRpPxx9Ac8ofF7_kqOowEby7F6glQ-bXk1G4_5xXsTcwJ8EBFC9lAZCAY?key=8s9Yh27gdK-ptPiMIt6tWA" alt=""><figcaption></figcaption></figure>

1. **Block “Start”** (any diagram starts from this block).
2. **Block “Load Data Table”** allows loading the “Data Table” from an Excel document. The following properties are specified for this block:

* File path (the path to the Excel document from which information needs to be loaded into the Data Table);
* Header (if the flag is set, the first row will be used as the header);
* Sheet (the ordinal number of the sheet from which data needs to be read into the Data Table).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdov69fBQb3iTFeJHWM38fO41hKtTYy_r3pd7Sh2DOemiScW6d6rszJqoSf47KQz2Mj94LrRemXRD9SKB8CRCkhVyc7aphjJSfXxcOlcZS2CsDo9ThIUtckQiVpUF90Vl2KEJqVguDgPJtIoyhLcydPyga0?key=8s9Yh27gdK-ptPiMIt6tWA" alt=""><figcaption></figcaption></figure>

3. **Block “For Each (Data Table)”** iteratively processes all rows of the data table.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeIHr5aTgvQYPhkX7dQimANWi-D-mquG-xcdJB_DQldODftemLhIYJ7MKvIjPqd33hHER7sSU5NMuz_oFXyi0XDyPFTk0oeVmwe8LKZdkS4BkMWSPE0-TkqjgPptQlL3pLC90a6aLU-eS_UO8oJfO4VVqFJ?key=8s9Yh27gdK-ptPiMIt6tWA" alt=""><figcaption></figcaption></figure>

4. **Block “Process”** allows creating scenarios consisting of several diagrams. The execution of the scenario will continue from the “Start” block of the specified project diagram. The execution of the scenario will return to the current block and continue in the current diagram as soon as the “End” block in the external diagram is reached. For the “Process” block, the property “Diagram Name” is specified (the name of the diagram file where the scenario will continue, in this case: CompleteEnrollmentProcessCreateWord).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdtdYgaQtsrScrXnWYaozLtd9jB-XGjsBIj-QNL_xGqc8OwJz60jNjrsjNJ-BS_DpheBvXd6vwnMwVRChTH_VvTFRspuutnYSxlTKOn-2c4XuGc01CGDSoOoTAEocbj7dcHxLqBvSxUFMGRgFFD9q1lBi8?key=8s9Yh27gdK-ptPiMIt6tWA" alt=""><figcaption></figcaption></figure>

5. **Block “Process”** allows creating scenarios consisting of several diagrams. The execution of the scenario will continue from the “Start” block of the specified project diagram. The execution of the scenario will return to the current block and continue in the current diagram as soon as the “End” block in the external diagram is reached. For the “Process” block, the property “Diagram Name” is specified (the name of the diagram file where the scenario will continue, in this case: CompleteEnrollmentPrintCertificate).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdBlv73Tn-q4actgKD_JtvgK0ZhK4-SZPFkJYINNWxfdLax1co_5kNnjpjPC0vL0UPR3aUC9UXIu-5wG0SvzsvdyQcKbMN_AYxkAEllDaA2FfCrVhjCIWAUWbccB8F7Fhm_wLEOyfFO3cMwdeTvfLzbaIk?key=8s9Yh27gdK-ptPiMIt6tWA" alt=""><figcaption></figcaption></figure>

6. **Block “Process”** allows creating scenarios consisting of several diagrams. The execution of the scenario will continue from the “Start” block of the specified project diagram. The execution of the scenario will return to the current block and continue in the current diagram as soon as the “End” block in the external diagram is reached. For the “Process” block, the property “Diagram Name” is specified (the name of the diagram file where the scenario will continue, in this case: CompleteEnrollment\_CreateFRDO).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXegB_AXIC8TfnsShatPkWyLqhXJ5Dh93W_-2cgAtcAoGB3SKHX5bkjhD1rQsC-isOxXPKXWBY63NszQLmZmudizCb8hu2H_z8zev-Z59Ujhu4WejgCQ1JVCfdYLUDMWHs7SSJdHr_hhQAsSrGPcPKbXCtZR?key=8s9Yh27gdK-ptPiMIt6tWA" alt=""><figcaption></figcaption></figure>

7. **Block “Condition”** checks the specified condition for truth, after which the execution of the scenario continues towards the “Yes” exit (if the condition is met) or towards the “No” exit (if the condition is not met).

The condition is written in the format: “variable” equals (==)/ greater than (>)/ less than (<) “value”.

For example: $a == “Hello”, that is, if the value of variable $a is equal to “Hello”, then the output is “Yes”, otherwise – the output is “No”.

$Result > 5, that is, if the value of variable $Result is less than 5, then the output is “Yes”, otherwise – the output is “No”.

In this case, the condition is set as: -Not \[string]::IsNullOrEmpty($Row\[0]). That is, it checks that the value of the zero cell in this row is not empty.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcby1AQs9klLc3bvfTwo6CJzQpGC-UZRNxNdI_rlmA9GcfQtKVIkBRRV6hAXxQk2keOg2xoMEf8HLtYOIoULzp2y7A68tw0vuOCcA65lleokMnyRLn1Jgq2ZrO6KlceaQuJN8so5jHa8fJVS00zkeNAJXk?key=8s9Yh27gdK-ptPiMIt6tWA" alt=""><figcaption></figcaption></figure>

8. **Block “Assign Value to Variable”** sets new values for one or more variables. In this case, three values are specified in the properties that need to be assigned to three variables, respectively.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdX0GvSdlv8eURMnesOzmAYie3C2YG8THqrkiNi_VcnihXMTdMlPFpBLu4EePaVdF8CC1zF4Ulcw8vyVM04l4q7o3ua1rB-2F85be4IFmG9-6qRghNjIebAvF_-x4dpc0vt6HNY11ZuZVal3ildWOPFU0y_?key=8s9Yh27gdK-ptPiMIt6tWA" alt=""><figcaption></figcaption></figure>

9. **Block “Assign Value to Variable”** sets new values for one or more variables. In this case, one value is specified in the properties that needs to be assigned to a specific variable.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfO7WST7F9n9zXIQVvA7FL4GEitPWXr7zYgTX1P_zmKgOJj_Y_w61Kzdoij8qG_aKvu3cPyiruNM7VZoS3E_3_lzsIeRgX9a9tjZiVcVWSIHaK7yemBPdaCgD8Rk1RRP7ZgztNvMGgybO-gV1emqJBIxAAg?key=8s9Yh27gdK-ptPiMIt6tWA" alt=""><figcaption></figcaption></figure>

10. **Block “Execute PowerShell Expression”** starts the execution of one or more expressions in a language compatible with PowerShell. In this case, one expression is used: $ListFIO.Add($fio). It adds the value $fio to the list $ListFIO.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfIIwQiTFPEArGLUjFdJb9pdTKfogQnFLzCjufc1RhCytaUIcPtOFVZ-XXvNhGvk6a1IQbXScj0PBpeOF4n5-JOV9WE0kKYhI3UfW6yzejilOVrsFfKMcumpHVCwQTABnkI7sXYWX0FKx6dtCp4lYtALUGT?key=8s9Yh27gdK-ptPiMIt6tWA" alt=""><figcaption></figcaption></figure>

11. **Block “End”** (this block concludes the execution of the scenario or returns the subprocess diagram to the main process).
12. **Block “Log”** allows outputting arbitrary messages and/or variable values to the log during the execution of the robot's scenario. For this block, the property “Value” is specified. The text constant is indicated in quotes, and the variable name starts with the symbol $. That is, this block logs an error message for the robot.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXey_03bottcveDiCgqXkvVMo9oUFFuEeFDFB1Eljia7befl_vJdGtdQMMxzafewNIWCot4mmLt4fgFU9mQ_s_I-qnsvnNiBJDX5duJzzBsYXgyeKj72PlGmU52dOSZkw0_5FBrfbORzOKwwRc0EJgsMMSMj?key=8s9Yh27gdK-ptPiMIt6tWA" alt=""><figcaption></figcaption></figure>

13. **Block “End”** (this block concludes the execution of the scenario or returns the subprocess diagram to the main process).

**Diagram “CompleteEnrollmentProcessCreateWord”**

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeZr2dutjQe8SiEAxeUQdD31IVKi1bhVpQUGnFt2lWanzsNUDVb8uelAuOPPASDGPMgk3KRKrBWHJavV7v5D5PGXkO3X5YFOiIJRnynxqj68nYg0jhYWaWGLFeFUZH0i9tCAunJz_K6GUR3nzY0WdwapT1V?key=8s9Yh27gdK-ptPiMIt6tWA" alt=""><figcaption></figcaption></figure>

1. **Block “Start”** (any diagram starts from this block).
2. **Block “Loop”** allows repeating a chain of actions (blocks) several times while counting the number of iterations of the loop, recording the current count in a special variable (specified in the “Loop” property), which can then be used in other blocks. Upon first entering the block, the value of the variable from the “Loop” property is set to “Initial Value” (in this case, it is equal to 0), and then the execution of the scenario continues towards the “Loop” exit of this block (into the so-called “loop body”). As soon as the execution of the scenario reaches this block again, the value of the “Loop” variable will increase by the “Step” value (in this case, it is equal to 1), and the transition will again occur towards the “Loop” exit. Once the value of the “Loop” variable becomes greater than or equal to the “Final Value” (in this case, it is set to the variable $ListFIO.Count), the execution of the scenario will continue towards the lower exit of the block. Don’t forget to connect the exit of the last block in the loop body to the entry of this block or any of the preceding blocks.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXduVQ40JN8fMhlmCJwRDMQCRFRX80ctqvtmfEPuIRTlk-aXyyb_sDgBlaOB63L59QLFI8Z9Wg4H_NPU9w9dA_v7NUOYtkBtl4J4jjFBessgVMH1_1w3r6qABrqybp-9zVtbBgeBUI6q7nhS_LjeZ4tUqXo?key=8s9Yh27gdK-ptPiMIt6tWA" alt=""><figcaption></figcaption></figure>

3. **Block “Get File Path”** retrieves the full path to the file with the specified name. For this block, one property “File Name” is specified (the file name along with its format).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcA5vt5TwRg8V7ozFV63gKrtYh-juQkZm_o17qxIIvZ27LrN3RHvnJi7YCu_lS2rpBLIthTjPtZfN0bAD72pAQKOE2wsUEPsGf7hmp-R9FDgPykwAfJXq2xpNHInH9A8vyplVEkS-G5LxIOwPll9DvpkRV9?key=8s9Yh27gdK-ptPiMIt6tWA" alt=""><figcaption></figcaption></figure>

4. **Block “Open Document”** allows opening a Word document. The following properties are specified for this block:

* Use COM (if the flag is set, the work will be done using the installed Word);
* File path (the path to the Word file that needs to be opened).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXc1G1WfHULIeuQrU1aBJU_dxVilkI3AJb1lpqyMNqwtfYMCypa9SLoifvD9AmiBeqSiXaD8TZDfh11fd6VBnHb3mdjgpf1PDfva-FkwCucPY_Cgx50LwawQU8DrhtAJuixvkIWbA2vZYSJabUdxBbrLbbcN?key=8s9Yh27gdK-ptPiMIt6tWA" alt=""><figcaption></figcaption></figure>

5. **Block “Replace All Variables in Text”** allows replacing all variables %variable% in the Word document. The following properties are specified for this block:

* Link to Word (link to the process of processing the Word document. The name of the variable in this property must match the name of the variable in the “Link to Word” property of the "Create Document" or "Open Document" blocks from the Word group that were previously used to create or open this document);
* Link to Document (link to the opened Word document, which is currently being worked on. The name of the variable in this property must match the name of the variable in the “Link to Document” property of the "Create Document" or "Open Document" blocks from the Word group that were previously used to create or open this document).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdLEZCB8xKjybOmc7Jq9aFu1h73kvwBh7itZxQbMKpKla8Iln_3KNN-4ArsmNHuhlLHIc22Z2EppaGI7qebYNV2wNguzTxBE3AkVvDpXUyeIwT0PycJMv7rsBmF-sOCGGWrhrWtRlfpRuqY7Zf0gphPI03E?key=8s9Yh27gdK-ptPiMIt6tWA" alt=""><figcaption></figcaption></figure>

6. **Block “Get File Path”** retrieves the full path to the file with the specified name. For this block, one property “File Name” is specified (the file name along with its format).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXetaCApxUqIAz8kjQWSk4QGd-eRVhJqhW1nNNLFNeXSb8tG_1rGn0f68VYBzQ9uvsHRAR8vRlIw8C-O9Qgo98iXxMV4DvZZcr0Ba1_OawevX20OiWcKBrgC-yyszs9GH1EP15Zmhvru0fvYHKCp0j7-_Px5?key=8s9Yh27gdK-ptPiMIt6tWA" alt=""><figcaption></figcaption></figure>

7. **Block “Save Document”** allows saving a Word document. The following properties are specified for this block:

* Link to Word (link to the process of processing the Word document, the name of the variable in this property must match the name of the variable in the “Link to Word” property of the "Create Document" or "Open Document" blocks from the Word group that were previously used to create or open this document);
* Link to Document (link to the document that needs to be saved. The name of the variable in this property must match the name of the variable in the “Link to Document” property of the "Create Document" or "Open Document" blocks from the Word group that were previously used to create or open this document);
* File path (the path to the Word document).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfI6u9q5qNwXsW4y1BaYDvMOoTAC9689PpRm34Hdkjp5d0HDFn_JnGszXoYUS5MEP3CiuS1jdRQ8EaPWAr2IeiRgIBqDy-DBlC5WXTgmXDkgYCC4FOZhnoP9IlCgTNpXEE3r3irjYpq2jJkilBqRB20VAvQ?key=8s9Yh27gdK-ptPiMIt6tWA" alt=""><figcaption></figcaption></figure>

8. **Block “Print Document”** allows sending a Word document to print. The following properties are specified for this block:

* Link to Word (link to the process of processing the Word document. The name of the variable in this property must match the name of the variable in the “Link to Word” property of the "Create Document" or "Open Document" blocks from the Word group that were previously used to create or open this document);
* Link to Document (link to the opened Word document, which is currently being worked on. The name of the variable in this property must match the name of the variable in the “Link to Document” property of the "Create Document" or "Open Document" blocks from the Word group that were previously used to create or open this document).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXd5XUsgSdI8jMafPAEq4tOjhkmVzQgEWuXnv7BeXQrChugwwBp2zSFLI5RSWZRLgCK65MgMDDatrxTkGqJjIlOGNmr6BcP9nbf-aM0va1Tw4-ZXnoqaNdj34i8qH3PYxi2CzqkAITEDy4fGMZpCqlA-Uq8w?key=8s9Yh27gdK-ptPiMIt6tWA" alt=""><figcaption></figcaption></figure>

9. **Block “Close Document”** allows closing a Word document. The following properties are specified for this block:

* Link to Word (link to the process of processing the Word document. The name of the variable in this property must match the name of the variable in the “Link to Word” property of the "Create Document" or "Open Document" blocks from the Word group that were previously used to create or open this document);
* Link to Document (link to the document that needs to be closed. The name of the variable in this property must match the name of the variable in the “Link to Document” property of the "Create Document" or "Open Document" blocks from the Word group that were previously used to create or open this document).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeE6VJEd6CRLd9YkCwwh1YTawwC6jpmScTyXrfPxb-KLu5U_bVCSILFwLGdreR5CTwuhWfjfrQtRJl6WVQ5KVvrB7h1kr_o4XYOnJbxhMo2GgX-APl3tMMG_gaT_1W1dnB4RZPGxoCLu1II-PGNoy_mO0k?key=8s9Yh27gdK-ptPiMIt6tWA" alt=""><figcaption></figcaption></figure>

10. **Block “Execute PowerShell Expression”** starts the execution of one or more expressions in a language compatible with PowerShell. In this case, one expression is used: $ListFIOString += ($Index+1).ToString() + ". " + $ListFIO\[$Index] + \[Environment]::NewLine. It adds a new line to the string in the format “1. Ivanov Ivan Ivanovich\r\n”.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeem4jXFX5zxIKS795aGESX3avBx7rHrySC2PFPo4DU9c9sMkBbKBSVQmlcUwu7Xl7tsyCxGrxck72egRtK6eLKx7VorLxeDl_dwt0C0OgEbxxxcwrE3soJqyWwE0bnPq7B09LMI6juXBsPwoX-TnAVjMrl?key=8s9Yh27gdK-ptPiMIt6tWA" alt=""><figcaption></figcaption></figure>

11. **Block “Log”** allows outputting arbitrary messages and/or variable values to the log during the execution of the robot's scenario. For this block, the property “Value” is specified. The text constant is indicated in quotes, and the variable name starts with the symbol $. That is, this block logs an error message for the robot.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfBngd6Ihy5ClZ_nT8hTkFyC7PHCl2045wiUZizIrI00xy_ap3Qd98cOeun-gX_dXXpkj1ZvH9_jzZVfE1UvlW9DTFOub5HgTT4xwrl98ZMTT0aGSz6EebE2fIhZ2mSA_PEryLPI9B5gHwYxjpn-rieQZE?key=8s9Yh27gdK-ptPiMIt6tWA" alt=""><figcaption></figcaption></figure>

12. and 13. **Block “End”** (this block concludes the execution of the scenario or returns the subprocess diagram to the main process).

**Diagram “CompleteEnrollmentPrintCertificate”**

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdSng4BpbBQ15GN6MFIHyXae0bcWggSn3XtqmJwic5U3rJrqwFIilzELkD4j1ckOZWV5_EEBfFfrSbFdNLN8XG00W6qFaFJDE3sIdAxETQ7mD6GlpydczoSmvThjk_dBNr52waAYLHOOIEZZ-KhPuFPFjk?key=8s9Yh27gdK-ptPiMIt6tWA" alt=""><figcaption></figcaption></figure>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdPpcj-1ygRYnfbkmuF8UXeJCp_dqIfrDWCEOgiMfm4_WiAxqZnf4Rpf7Qg_OyHjWbYKpDX9odLEp6XOZUK6Ci1XSJmWW-jgjJ6Za6nll9_nst5Y8xYgwi0Rh5MBnvEq2gHH6DL2RyBbujTLCLkUHIjWmgi?key=8s9Yh27gdK-ptPiMIt6tWA" alt=""><figcaption></figcaption></figure>

<br>

1. **Block “Start”** (any diagram starts from this block).
2. **Block “Message Box”** allows displaying a modal dialog box to the user with a specified title, text, and set of buttons. If a window with multiple buttons is used, the block allows recording in a variable the text constant corresponding to the button pressed by the user. The following properties are specified for this block:

* Title (the text that will be displayed in the dialog box title);
* Message (the text that will be displayed inside the dialog box);
* Buttons (the buttons that will be available for the user to press);
* Image (the image that will be displayed in the dialog box).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcM_5803ZP9HxSjAlkpZKrmH3qeily8H4uWwTItmlSWBKfccppxB96-RGA3UCldlA15brbSzHaNznCgqrEzHhJ4kEM9ewLsoGAzxU8F0jLiVUtkr-sSNjV7pUh_8NnKjansKKD24TKP_aS9tmd7QdyarOMx?key=8s9Yh27gdK-ptPiMIt6tWA" alt=""><figcaption></figcaption></figure>

3. **Block “Condition”** checks the specified condition for truth, after which the execution of the scenario continues towards the “Yes” exit (if the condition is met) or towards the “No” exit (if the condition is not met).

The condition is written in the format: “variable” equals (==)/ greater than (>)/ less than (<) “value”.

For example: $a == “Hello”, that is, if the value of variable $a is equal to “Hello”, then the output is “Yes”, otherwise – the output is “No”.

$Result > 5, that is, if the value of variable $Result is less than 5, then the output is “Yes”, otherwise – the output is “No”.

In this case, the condition is set as: $Result == "Yes". That is, the value of the variable $Result, which will be output from the previous block, must be equal to “Yes” (i.e., in the opened message window, the user must press the “Yes” button).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeFk03wvwhdQcwV8T0SCbOjaGqw9LzkXKosP9aU2L9d1ySk1gz9A-TutE2ER7eHe1xU6E0DJw6mc0moj-9qvxvgkJtOZW-H3khKVP7DiX7UyzqGWvvpp-ZS-lc7l75u0vM57P5UmRgI5nnHEYLqnl2v8dFt?key=8s9Yh27gdK-ptPiMIt6tWA" alt=""><figcaption></figcaption></figure>

4. **Block “End”** (this block concludes the execution of the scenario or returns the subprocess diagram to the main process).
5. **Block “For Each (Data Table)”** iteratively processes all rows of the data table.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXenQWTG9Dt6ypJRsm5YenomsXGMRRk5XKeJmMLazh1lkBOIlA4aUbd5fOCgZCWNfkb_e3YZgIqzgPJFYUMGnivpzKichB0IBQ82BP71BfuipvFh2v9WYHjQMdaie4IwQgt-g8i-mXy1zFPiZbuHjJBVhWAn?key=8s9Yh27gdK-ptPiMIt6tWA" alt=""><figcaption></figcaption></figure>

<br>

6. **Block “Condition”** checks the specified condition for truth, after which the execution of the scenario continues towards the “Yes” exit (if the condition is met) or towards the “No” exit (if the condition is not met).

The condition is written in the format: “variable” equals (==)/ greater than (>)/ less than (<) “value”.

For example: $a == “Hello”, that is, if the value of variable $a is equal to “Hello”, then the output is “Yes”, otherwise – the output is “No”.

$Result > 5, that is, if the value of variable $Result is less than 5, then the output is “Yes”, otherwise – the output is “No”.

In this case, the condition is set as: -Not \[string]::IsNullOrEmpty($Row\[0]). That is, it checks that the value of the zero cell in this row is not empty.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdLtd2eOg19V6KjSJZJwILxXbN1hLdiciVdv81RF_vbLLaj6ttD5Mbtqw7V_eqZFV-f6__9ZSNz_5Hfbe6wQDoZp-TP9CW1Vh9WrdPRnD02ny_Si4dkhM2RZkJifN8lbhu8HCNCWnzXDWQYKSkUneKGgTSs?key=8s9Yh27gdK-ptPiMIt6tWA" alt=""><figcaption></figcaption></figure>

7. **Block “Assign Value to Variable”** sets new values for one or more variables. In this case, three values are specified in the properties that need to be assigned to three variables, respectively.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeofvqINxLv5i4XMKGF6S2OeSXirpzJFjb6wBK4HIYbZTo0fZjfEC1jFNRMiOnKOjoFODJ1E9YTT1J2oRlK6EK1ys33H_ZiI0JVCrEov-Cy88Y8iG81Z90_Qq-UNNkfeILj87WHcqxZ8GcF50FDDn2Jwavv?key=8s9Yh27gdK-ptPiMIt6tWA" alt=""><figcaption></figcaption></figure>

8. **Block “Assign Value to Variable”** sets new values for one or more variables. In this case, three values are specified in the properties that need to be assigned to three variables, respectively.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcq9jrF5Dscex9CYgDKCFE0nc2tLmnmvXPoF9-gtid0BxAYcCt3wu55gu1hzwazROG67mEhWnmR-1eTkP9RJFYwTv2NmI_pJn1gCrVGmFIwi9h80Zs6IRa_k4BB1SgRvHcKkeNjWYAhCTHWfzirdb5XYTvt?key=8s9Yh27gdK-ptPiMIt6tWA" alt=""><figcaption></figcaption></figure>

9. **Block “Get File Path”** retrieves the full path to the file with the specified name. For this block, one property “File Name” is specified (the file name along with its format).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXf0mKMpu4fLl1-cw0lmfaVYB14i8lPwLd23OzOtfhWR7nyxlV6XBs-4c_QN_EaTHM5lHUM_als8X8bW7msGD_saIHj9sfLntolHAyYJG-lkqbqrFrpOraKLmEzYvbe-A7---ehfeXZ9zAuVR_LlTMiSBhVH?key=8s9Yh27gdK-ptPiMIt6tWA" alt=""><figcaption></figcaption></figure>

10. **Block “Open Document”** allows opening an Excel document. For this block, the property “File Path” is specified (the path to the Excel document that needs to be opened).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdnAcSkvmns-qPISVTLyzoekddszqX6lH63NN5X8tHLRP3syo5CHCUs5IuQQagdYwc6QPlOWYnc6YLqjlaYixZA6odr_Jz10I9LrLxtXkTloaTnPfm1TT3E82jBKQ8zQLXBSg3vz_fr5lfuMNJXg9ZnGk8h?key=8s9Yh27gdK-ptPiMIt6tWA" alt=""><figcaption></figcaption></figure>

5. **Block “For Each (Data Table)”** iteratively processes all rows of the data table.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfhpBHMN5o-_zc-x9ge6U_pmyO_QzQK7GVWCSqOJEa2TLbfcX5-S6mR5YpzsHYImuiazFrGRgzNyqH_CxrTdhFIueiQLoNN1lZEBTmgZuRTxIhOugx_m84studv7G4WhhVSsBKWxrlpJKbVnKLUowu2B_yq?key=8s9Yh27gdK-ptPiMIt6tWA" alt=""><figcaption></figcaption></figure>

6. **Block “Get File Path”** retrieves the full path to the file with the specified name. For this block, one property “File Name” is specified (the file name along with its format).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXf0mKMpu4fLl1-cw0lmfaVYB14i8lPwLd23OzOtfhWR7nyxlV6XBs-4c_QN_EaTHM5lHUM_als8X8bW7msGD_saIHj9sfLntolHAyYJG-lkqbqrFrpOraKLmEzYvbe-A7---ehfeXZ9zAuVR_LlTMiSBhVH?key=8s9Yh27gdK-ptPiMIt6tWA" alt=""><figcaption></figcaption></figure>

7. **Block “Save Document”** allows saving an Excel document. The following properties are specified for this block:

* Link to Excel (link to the process of processing the Word document, the name of the variable in this property must match the name of the variable in the “Link to Excel” property of the "Create Document" or "Open Document" blocks from the Excel group that were previously used to create or open this document);
* Link to Document (link to the document that needs to be saved. The name of the variable in this property must match the name of the variable in the “Link to Document” property of the "Create Document" or "Open Document" blocks from the Excel group that were previously used to create or open this document);
* File path (the path to the Excel document).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeKtDSxHNebsDPHvkHGrkdyTdd1a3pHhDU-pUm4M0m7piPPwBVWP9D2YDHZA-yJIeQ6JeEpGCAEtSA73brSKMRKWa5uLhE8RdriyjYKxK4d04n1Ed_DA66GZTyfF5RWkCBVjweeDCNqGA-z_o6T4-7P4KxS?key=8s9Yh27gdK-ptPiMIt6tWA" alt=""><figcaption></figcaption></figure>

8. **Block “Close Document”** allows closing an Excel document. The following properties are specified for this block:

* Link to Excel (link to the process of processing the Excel document. The name of the variable in this property must match the name of the variable in the “Link to Excel” property of the "Create Document" or "Open Document" blocks from the Excel group that were previously used to create or open this document);
* Link to Document (link to the document that needs to be closed. The name of the variable in this property must match the name of the variable in the “Link to Document” property of the "Create Document" or "Open Document" blocks from the Excel group that were previously used to create or open this document).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdjArGf8-ZzDiEeJztzE5UnxH_yOlJhLuX1ENo123UeJejulCWEde2GCYRTtrQdm-mYOnnzydW9cveYg1748KQ3hEY9XiJ392R-Dlrn5qqexaB9yzhg6iHf9ox32yUt0UhYB3BeeJcnI9HPM1o5MMk7XIHJ?key=8s9Yh27gdK-ptPiMIt6tWA" alt=""><figcaption></figcaption></figure>

9. **Block “Add Item to List”** adds the specified item to the end of the list. The following properties are specified for this block:

* List (the list to which the new item needs to be added);
* Item (the item specified in this case as a variable that needs to be added to the list).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXciKuemL96_s7Te0MMFtx8z9YYyGYrQ01kPRwl3WFKJNsKOZ2SmkqY9lk850KfSOt32F11I_imtX9ILwi0hY7qZXvuBJVJdU-uQBXJGSYz8Bwar8u0eg0PBCH_4HBzzJBwNotbgdoh5Ig0gsYs2ANHTvy_F?key=8s9Yh27gdK-ptPiMIt6tWA" alt=""><figcaption></figcaption></figure>

10. **Block “Send Email”** allows sending an email using the SMTP protocol. The following properties are specified for this block:

* Server;
* Login (the login required for authentication on the server);
* Password (the password required for authentication on the server);
* SSL (the set flag enables the use of a secure connection);
* Sender Email (the email from which the letter will be sent);
* Recipient Email (the recipient's email to which the letter needs to be sent);
* Email Subject (the subject of the email);
* Email Text (the content of the email);
* HTML Markup (the set flag enables the function of sending the email content as an HTML page, which may contain tags);
* Attachments (a list of file paths that will be attached to the email);
* Timeout (the time to wait for a response from the server in milliseconds); Note: in later versions of Sherpa Designer, this property is called “Wait Time” and is specified in seconds.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXc45r-lzI2DrDrS8MM3ZDrmQov6VqIDlcBa8QfJAT9cMWZdj1-6KM73BZuwUol4kUq5hSF9B-v7HbaeR8XVy-mdVP-m_N7fCiNbUxokuB1-DN-Aq9rdCi72FZg7rcYWFk1Z7GZ5fBkdNKL1stKkHyAL5EGj?key=8s9Yh27gdK-ptPiMIt6tWA" alt=""><figcaption></figcaption></figure>

11. **Block “Log”** allows outputting arbitrary messages and/or variable values to the log during the execution of the robot's scenario. For this block, the property “Value” is specified. The text constant is indicated in quotes, and the variable name starts with the symbol $. That is, this block logs the attachment files specified using the variable.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcjMc2Niq23uUJzKUG20qvUYOV5s8AmgQ8Vj_qgHyoXpKnLr9Rd9YXlFHlYxhK3l3ekvk9Gq62t6G4rpruw4dqI8rBsaNlcSMcTVi1A-rXllzJp8nMTZeR4qoVQCzMjW1rjIdT--ocOfS1ZAqMvmaQ6g0_s?key=8s9Yh27gdK-ptPiMIt6tWA" alt=""><figcaption></figcaption></figure>

12. **Block “Log”** allows outputting arbitrary messages and/or variable values to the log during the execution of the robot's scenario. For this block, the property “Value” is specified. The text constant is indicated in quotes, and the variable name starts with the symbol $. That is, this block logs an error message for the robot.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfziuJqMbV6zqZgtQ1d6R1xvL_Z5HmYf-Ag-euMp_ppny8QRpYPtMbnc_7EXpzspBrVLNnibmNNvBemVrEfZ2PD-c5Lati83tGTBvjQb_fhil7UI_6CBSU3Xep9z-O9Uo-BzmLfkz_XVMDeulExSY22K2O1?key=8s9Yh27gdK-ptPiMIt6tWA" alt=""><figcaption></figcaption></figure>

13. **Block “Condition”** checks the specified condition for truth, after which the execution of the scenario continues towards the “Yes” exit (if the condition is met) or towards the “No” exit (if the condition is not met).

The condition is written in the format: “variable” equals (==)/ greater than (>)/ less than (<) “value”.

For example: $a == “Hello”, that is, if the value of variable $a is equal to “Hello”, then the output is “Yes”, otherwise – the output is “No”.

$Result > 5, that is, if the value of variable $Result is less than 5, then the output is “Yes”, otherwise – the output is “No”.

In this case, the condition is set as: -Not \[string]::IsNullOrEmpty($Row\[0]). That is, it checks that the value of the zero cell in this row is not empty.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdyBSLPP3unN5p3PVdaejHxsrhviVpLf7NCiVgAFHxgwgtdXpXOu-uXgq_hBpT16WUgqOPSwNlH1sttKa3uw5PP6sy8F33WiPtb46C2N6b5mosgaYjjCBoGWg7KEZ_KPoVyJVaZQwbKalQL6x_ejEHWOx9M?key=8s9Yh27gdK-ptPiMIt6tWA" alt=""><figcaption></figcaption></figure>

14. **Block “Loop”** allows repeating a chain of actions (blocks) several times while counting the number of iterations of the loop, recording the current count in a special variable (specified in the “Loop” property), which can then be used in other blocks. Upon first entering the block, the value of the variable from the “Loop” property is set to “Initial Value” (in this case, it is equal to 1), and then the execution of the scenario continues towards the “Loop” exit of this block (into the so-called “loop body”). As soon as the execution of the scenario reaches this block again, the value of the “Loop” variable will increase by the “Step” value (in this case, it is equal to 1), and the transition will again occur towards the “Loop” exit. Once the value of the “Loop” variable becomes greater than or equal to the “Final Value” (in this case, it is equal to 37), the execution of the scenario will continue towards the lower exit of the block. Don’t forget to connect the exit of the last block in the loop body to the entry of this block or any of the preceding blocks.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXe8tG5siJ6NQxWCighczDF6bm5OuCJvi1b1_PXQjIlSPBAm7022gilMYQvMxd_MY6RTj3heM-5g7faRA71VqC99X2LUuKbB10JLk2lvEmwJsjpH-cDhDNhx9IV9hYRsLSXOtu5NI1d6T70RWqWFssrui-8?key=8s9Yh27gdK-ptPiMIt6tWA" alt=""><figcaption></figcaption></figure>

15. **Block “Execute PowerShell Expression”** starts the execution of one or more expressions in a language compatible with PowerShell. In this case, one expression is used: $TableFRDOIndex. It adds one to the variable.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeAnTJNR_HUfrER0yVqg1g2z-Q-_o1C-VBur3ggayU09ROXPMsOGsdEAFfltRdfLPpYQWluSOZiOo4hcy4JyTg0OfUVAYoY9WeSAy6vrPiwi6iNin_EY2Lvyq2goN9ivb9Pj8p5avoR0V2aVYaejWeayUg?key=8s9Yh27gdK-ptPiMIt6tWA" alt=""><figcaption></figcaption></figure>

16. **Block “Write Value to Cell”** allows writing a value to a cell in an Excel document. The following properties are specified for this block:

* Link to Document (link to the document currently being worked on. The name of the variable in this property must match the name of the variable in the “Link to Document” property of the "Create Document" or "Open Document" blocks from the Excel group that were previously used to create or open this document);
* Sheet (the ordinal number of the sheet where the required cell is located. Numbering starts from 1);
* Row (the row number where the required cell is located. Numbering starts from 1);
* Column (the column number where the required cell is located. Numbering starts from 1);
* Value (the variable that needs to be written to the required cell).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfiTZY1dKDDgTBMeqOB92H_DSeZQ7aM3gz7MITV66eZLbrehxeM0lPLgkomhDfeQwdudorRJcYVOTfr-nS4HaHDHFDIy0wlx_U-4Gq9HpO9WbyN-5h_SBVVyKXe9pIF93ZvJUlrrmbq7YoiLsSJA13XYmc?key=8s9Yh27gdK-ptPiMIt6tWA" alt=""><figcaption></figcaption></figure>

17. and 18. **Block “End”** (this block concludes the execution of the scenario or returns the subprocess diagram to the main process).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sherparpa.ru/en/sherpa-rpa/sherpa-designer/primery-robotov/enroll-certificates/complete-enrollment.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
