I am trying to make a workflow were I do not need to upload file manually, instead it gets automated.
The file is to be upload every-time it is Updated in a specified folder. I have figured out all the steps and made it work, only error I am getting is this " Error: Assign - Index was outside the bounds of the array". Now, the workflow is working perfectly fine when I am copying to the folder and replacing the files.
I am using “Monitor Event” and “File Change” activities to perform this task. I am sharing my workflow below.
(upload://wwqP9RjsbRQy3rXOBLNxJr9vFIO.xaml) (25.1 KB)
Please if you have time have a look and suggest how to make it write.
@Rupendankhara - Your workflow didnt upload properly… can you reattempt?
I ran into this issue too. The error is telling you that you are searching for a index position that does not exists in that array.
My use case was to Get Text from the screen and continue to do so until a value equaled a specific number. This error was being thrown occasionally and not consistent. Tried several things. Nothing worked until I started adding a Delay before Get Text was called again. My conclusion was there was delay on the system side that the Get Text was capturing at the time the value was being updated. Causing the array to be less than expected.
Hope this helps!
@Rupendankhara - Can you send over some sample data?
Also have you tried “Log Message” as you iterate through your code to see where its failing?
Unfortunately, I can not share File platform were I am trying to upload. You can imitate it by uploading on Google Drive or Dropbox. Yes, the buttons and User interface elements are way different. But, you will get my point, looking over to workflow.
Create a file in Format - " COMP - 002 Testing Lab"
The program is failing to capture “002” when i download file from browser. Note, it is working it is capturing it when i am copying it from another location on computer.
Look at the “Assign Activity” in top part of my workflow. T
If its working locally and failing when pointing to Dropbox the issue is most likely happening when pointing there. What I would do, is test this by using a Log Message of the File Name to ensure it is being captured properly.
Once you know if/how the File Name is being captured then work on splitting it.
@Jarzzz Were do I go to retrive this “Log”
It’s in the Output window of studio. To enable it, look at the bottom left of your studio window and click the Output tab.
The File Log Shows the file Name Captured. It looks like a temporary File name, while its been downloaded. How to Correct this error?
Thank you again,
It does not help. My issue is not with getting the file name. I get that, the problem is how to work with "
File change trigger" and Get file name for downloading file. As downloading file have “temporary names” or something else then the actual file name.
if you want that trigger there is literally an activity that can be used in a monitor events scope called ‘File Change Trigger’ check it out and get back to me.
It is pretty useful as your ‘unconfirmed download’ is basically a still downloading file set for completion.
Hope this helps
I think you have not read my earlier conversation, we are already using “File change Trigger” the problem is getting the file name, when the file is downloading.
Let me explain-
- The program should Start when I download the File.
- It should Get the information of file (name, location)
- Host list of event using that information
The problem is we are getting output File name as - " Unconfirmed 620608.crdownload" instead of “COMP - 123 Testing File”
I am no expert but I suspect it is caputuring file name while it is still downloading and using it.