My team is working on to create a query for getting the records . So What I need in query is something I’ve confusion.
I have Excel records (Invoice numbers, Some text , Amount ) that have to match on Website and if match then have to attach one file on website along with that invoice number .
Query needs for find file name on shared drive.
File name would be ABC123456 898989(123456 is the last 6 digit of some fields for particular invoice, 898989 is the tracking number)
So, how should I pass the query for each invoice ? (Inside For each activity ? ) or what exactly I need for that ?
Current query returning Invoice number , ABC123456, 898989 .
use for each to loop through the excel data to get the invoice
var = from file in Directory.GetFiles(directory path)
let fileName = Path.GetFileName(file)
where fileName.Contains(invoice number fetched from excel datatable )
select fileName.SingleOrDefault();
you can use this code for the same for directory path use the shared drive path.
if you are using database. use execute query activity to get the table data as datatable. Loop through the datatable and use row(“Invoice number”) to get the invoice
I am looping through each invoice (For each invoice row in Excel database)
I have SQL Data COlumn 1 has Invoice number , Column 2 has file name (Some may be blanks)
Now not able to achieve below step, Get the file name for particular invoice and check if it is available on shared Folder ?
I’ve have to look into Database’s data and have to get the name if available .
IF I have file name from database then I have to check in my shared drive if it is available? and need to proceed from there.