I had contacted presales about a month about taking information out of a text file and using it to fill out a PDF form. I have been able to complete that part of the workflow but the customer threw me a bit of a curve ball today. They printed multiple pages from there software that generates POs and it prints all 3 POs as one text file with no page breaks. I need to see if it is possible for workflow to create a new fillable pdf form for every 50 lines of the text file. I will attach the text file and the fillable pdf as well as the wfi file of the pattern matching that I am doing to capture the information for the fillable PDF.
Question
Question
Answer
If you want to create a new PDF file for every 50 lines of the text file, you could use an additional Pattern Matching activity (to create a multi-value token, where each value is a 50 line section of the text) and then a For Each Value activity to run your existing activities for each 50 line section. Something like the following:
Note: If you went this route, you would need to change your existing pattern matching activities (now within the loop) to point to the For Each Value token, rather than the Retrieve Document Text token.
Now, looking over your included text file, one potential problem I see is that the POs don’t appear to be an exact number of lines apart each time. For example, the first PO’s requisition number is on line 46 (i.e. 4 lines from the end of 50 lines), while the second PO’s requisition number is on line 98 (i.e. 2 lines from the end). This might make using your existing pattern matching activites difficult. To get around this, you might try making the “every 50 lines” pattern match a little more dynamic, maybe using a pattern such as (\d{2}/\d{2}/\d{2}(.*\n){45}) to grab a certain amount of lines after the first PO date, rather than just grabbing every 50 lines. This approach would definitely require some reconfiguring of your initial pattern matching processes, but it might be worth testing out.