I have a scenario where I need to check if file already exist in the webpage, if not I need to upload the file. The existing files will be displayed in a table in webpage which we can extract as a datatable. Now I have to check whether the table contains the file name which I need to upload, if it contains then skip that file and move to next file in the local folder.
Can someone please provide ideas to achieve this?
Could you please share the workflow which you created.
- You can use data extraction.
- Then you can use for each data table activity in that you can use if condition.
- Incase if you are filename displayed in column you can check like below.
Currentrow(columname) = filename
If condition met you can check break activity.
You can search until the lastrow if no found you can upload the file.
In If condition if the name matches then I can use Break but if it doesnt match then how do I handle the Else condition for each row?
use data scrapping - dtData
Assing Activity:
hasFound | Boolean =
dtData.AsEnumerable().Any(Function (x) x("ColName").toString.Trim.ToUpper.Equals(strFileName.ToUpper))
and use hasFound to fork the two branches e.g. for uploading the file
This works great, thank you!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.