Delete monthly record when running for second transaction deletes the previous yearly record of first transaction-Assignment 2-Level 3

Hi,

I am almost done with assignment 1.However i am stuck up here.
Delete monthly record when running for second transaction deletes the previous yearly record of first transaction.How to ensure the delete montly record only works for csv file?
In my case it deletes .xlsx file of yearly record which was saved by previous transaction.

Thank you.

1 Like

may i know what is mentioned in the path property of delete acttivity
kindly share the screenshot of the property panel of delete activity

Cheeers @Vidya_Srinivasan

I have complicated it further i feel.

It was simpler before i posted on this forum.
Delete had path as in_ReportsDownloadPath.
Which in turn is being passed as in argument for value -in_Config(“Download_Reports”).ToString

1 Like

no worriees
may i know what is tthe value of in_ReportsDownloadPath
Cheers @Vidya_Srinivasan

in_Config(“Download_Reports”).ToString

The code i posted is working :slight_smile:
However easier ways to do are always welcome !

I didnt see any post on this issue in this forum.

1 Like

Fine we can reduce the if condition like we can mention that limitation of csv in the input of for each loop itself
likethis
Directory.GetFiles(yourfolderpathvariable,“*.csv”)
This will give only csv files which can be mentioned in the for each as input and we can remove the if condition so that we can directly mention the delete inside the for each loop

this would improvee the performance
Cheers @Vidya_Srinivasan

kindly let know for any queries or clarification
Cheers @Vidya_Srinivasan

Thank u so much for detailed explanation on UI path for every query !
Makes it easier for us to proceed further :slight_smile:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.