In this post I am going to discuss an interesting requirement that I was asked by a reader of Siebel Unleashed. The requirement is little complex but I will try to explain it as simply as I can. Before going into the requirement let me explain the component of the requirement. We have a bunch of files that we will need to work upon and those are:
The folder where the files will look something like this
Now Let’s move on the requirement
- Read the files name from SRList.txt.
- Extract the SR Number from these individual filenames.
- Read the Activity information from the individual file.
- Create Activities under the SR Number after reading from the file.
- Repeat step 1-4 till all the filenames are processed from SRList.txt
If you look at above screenshots here is what needs to be done:
- Read filename SRList.txt (First entry to be read will be 1-111111.txt)
- Extract SR Number from the file name (1-111111)
- Read Activity Information from individual file (1-111111.txt)
- Create Activities under the SR Number after reading from file (2 Activities will be created under SR Number 1-111111)
- Repeat Steps 1-4 (process 1-111112.txt, 1-111113.txt etc)
I hope I have made requirement clear. In next post I am going to discuss solution and code to complete this requirement. In the mean time I would like to hear your thoughts on this and any solution you might have in mind.