Can K2 be used to post to folder depending on file name?

  • 11 January 2013
  • 1 reply
  • 1 view

Badge

I have a request to build an document approval workflow.  If the doc is approved, the customer would like the file to be dropped to a folder based on the following parts of the file name:


<year>_<quarter>_ <folder indicator>_...


·         The year will be the current year the file was produced


·         The quarter will be the current quarter of the year in which the file was produced (1Q, 2Q, 3Q, or 4Q)


·         The folder indicator will signify which folder under a specific document library where the file must be placed.


·         File naming conventions:


o    Query Only file - 2012_03_OB1_QO_MembersSource.txt


o    TIN Reference 2013_01_OB2_ReportSourceFiles.zip



So for the first example, there will be a document library with folders named OB1 and OB2; sub folders named 2013, 2012, 2011, etc.; sub folders named Q1, Q2, Q3, Q4.  Can this be done with K2 Blackpoint?


 


 


 


 


 


1 reply

Badge +10

Sure.  You would need to use nested Inline functions with logical If conditions to build out the folder string that would be passed to the Document event.


Building out these nested Inline functions can be a bit confusing so I would recommend using dataevents to save out the results of the logical conditions to a datafield which you could then evaluate the results in the viewflow while testing.


Hope this helps.

Reply