I need some help, please.
For the Assign activity, I have:
ReportFilePath: path.Combine(Environment.CurrentDirectory, in_ReportsDownloadPath, “Report-” + in_TaxID + “-” + in_Year +"-" + month.ToString + “.csv”)
When I use a write line it prints out as:
I then use a Type into activity with my ReportFilePath variable.
When it runs in Window Explorer it saves the file as:
Why would it save as something other than what I have in my ReportFilePath variable?
I set it to EmptyField, but seems like it’s only taking the first part of the path and not the combined part when it is typing into the file name.
Please help. I have some hardcoded info since I am testing this as a standalone workflow
System1_CreateYearlyReport.xaml (28.5 KB)
Can you clarify this point? Are you typing the filepath into a Save Dialog for like Excel or something? If so, at that spot, there can sometimes be performance issues. My suggestion is usually to use a Retry Scope, and put the Type Into inside along with a Get Text, and in the Condition spot put a Is True to check the Text that it equal to the filepath variable. That way, if the Type Into is laggy, the job will not be impacted and still be successful.
Other causes of a wrong filepath in the TypeInto is if DelayBetweenKeys is too fast, which I usually set to 20 miliseconds.
I have not looked at your workflow though, but just thought I’d chime in quick incase it solves something.
Thanks for the suggestions.
Because my ability to test has been sooooo slow since Friday afternoon, I added an on Element appear to make sure the save as box was open before the Type into activity. I added a delay before and after entering the file path name. (this is currently hard coded into the variable since I’m testing this workflow as a standalone process)
I added a click activity to click in the file name field to make sure it was keeping the Type Into text. then my click save activity goes and my file is still saved as Report-TaxID-2…
Save as looks like this:
Then my type into looks like this:
Then my click activity looks like this:
Then it clicks save and it comes out looking like:
*Disregard that the files haven’t been deleted and the yearly report hasn’t been created yet. those pieces are working, I’m just getting the pieces that are broken.
Use a Get Text activity and output what the input box equals before clicking the Save. This will tell you if the input box is being typed into correctly.
If the Get Text tells you it equals "Report-IT213456-3, even though it shows that you have typed in the full path, then something is wrong. I would suggest also having SendWindowsMessage and SimulateType unchecked while testing.
I found a solution. I don’t know if it is the correct solution.
I added a send hotkey activity to ensure that the default file name was being deleted out of that field.
It’s working now as far as saving the file name correct.
I don’t know if that’s the best way to do it, but it worked!
Thanks for your help!
Yeah, I’m not sure, but if it works it works
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.