Hi all,
I have a scenario, where I need to perform some steps on each file…
so Transaction item would be Filename…
I need to loop through each file in a folder-- from get transaction i should get one file at a time.
Please help on this
Thanks
Hi all,
I have a scenario, where I need to perform some steps on each file…
so Transaction item would be Filename…
I need to loop through each file in a folder-- from get transaction i should get one file at a time.
Please help on this
Thanks
Hi @MEGHA_cs
You can try with Get Queue item and then use the output in for each and loop them there by this no transaction will go to inprogress
Regards
Sudharsan
Thanks.
but I dont have Orchestrator
Ohh You are using the transaction item as Datarow?
If yes what you can do is
You will be reading the input file right below that keep for each row in datatable and loop through it and do you pre requisite steps
After that looping it will start with the actual transaction steps
Regards
Sudharsan
Hi @MEGHA_cs - Try the below steps
(Variable of type Array Of Strings) Files = Directory.GetFiles("YourFolderPath")
(Variable of type String) FileName = Files(Index)
Thanks,
but can you please explain, what would be transaction item
1, Modify the transaction item to string from queue item and change io_Transactiondata to Array(Of String) from datatable
2. In get transaction data remove get transaction item and add if condition with in_TransactionNumber=1
then side use directory.GetFiles("Folderpath")
and assign it to io_Transactiondata
3. Add one more if condition with in_TransactionNumber <= io_Transactiondata.Count
…Then side use out_TransactioNitem = io_TransactioNData(in_TransactionNumber-1)
and on else side assign out_TransactioNitem = Nothing
Hope this helps
cheers
Thanks, but am getting this error
Retry Get transaction item: Object reference not set to an instance of an object.
I have change Transaction item to string Datatype in all states right?
Please delete get tranasaction item activity only…you dont need it
And the error says something is null
Yes you have to change to string wverywhere
Cheers
Thanks, its working
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.