Hi Anton,
This function can be tough to automate because it seems like every application has a different type of Save As window that gets generated when you use the Save As function form the application. Tableau's save as box is a tough one to deal with for example. In this case, we usually recommend trying to use the Utility File Management VBO to save the file to the default directory and then move it to the desired location with the desired name. If this fails, then you can try to use Surface Automation as a last resort.
Here are some steps for the Utility File Management way:
Check if File exists
- Inputs Tab - Check if File exists (Under Business Object →Utlility-File Management/ Action →File Exists
- Outputs Tab – Store In create the flag output Item
Save the Default Filename
You will take the defaulted filename that is given within the Window.
- For example I have created a Navigation Stage with that sets focus to the Window (You can do this multiple ways)
- Then I created a Navigate Stage that Clicks on the Save Button.
- Just as a precaution I have added the catch to see if the Replace or overwrite Dialog box is present. This is done by first creating a Decision stage to check for the presence of the Dialog Box. You will have to spy the Dialog box and retain the image. You will want to create a Data item that will hold the image after it has been spied.
Replace Data item
- Next, Create a Read Stage that will read the image
Please note that you will have store the image for comparison.
- Next, Create a Decision Stage that will Compare the 2 images
- After the Decision Stage is created you will want to set the Yes and No up to the appropriate next steps.
Move File
- Create another Action Item Under Business Object →Utlility-File Management/ Action →Move File
Please note you will need to Create the values of the File Path and Destination Path as Data Items
Rename File
- Rename: Next create the Actions and Navigate field that will rename the filename please see the example below:
Delete Default File
- Delete the File: Create a Data Item that has the File path information. Next create and Action Item Under Business Object →Utlility-File Management/ Action →Delete File
Please make sure that the Outputs are created.
Check default file present
- Finally, confirm that the Deleted File does not exists.
------------------------------
Gabe Marquez
Technical Support Engineer
Blue Prism
------------------------------