As a final step, we will update the PO number generated by Apptivo to the Excel spreadsheet:
- Let's first open an already created PO in the Apptivo PO management application. If you do not have one already, create a new one by filling in the mandatory PO fields and clicking on Create. Then go to My POs on the left pane and open the new PO.
- Go back to UiPath Studio and within the Then block, add a Find Element activity and indicate the PO number element, as shown in the following screenshot:
- For the Find Element activity, update the selector aaname field with a wildcard character * so that any value is accepted. Check the WaitActive and WaitVisible options in the properties panel:
- Let's also add a log message with the level set to Info and the message "PO Created Successfully".
- Now that the PO is created, let's extract the PO number and store it in a variable. Add a Get Text activity within the Then block and indicate the PO number. For this activity, update the properties as follows:
- Fill the aaname selector field with *, as shown in the following screenshot. (The wildcard character * can be substituted for any characters that can go in this field, for example, 1, 12, and 103, and so on.)
- Update WaitForReady with WaitForReady.COMPLETE.
- Set the Output Value as strPO. This is the variable where we will store the extracted value:
Now that we have extracted and stored the PO number, let's update the spreadsheet.