Moving document to a folder depending todays date

Certified Senior Developer

Hi all,

how can input the documents destination in the move document smart service process node without hard cording the folder name, depending on todays date the document will be sent to a specfic folder. for examle I have a parent folder called Documents. inside I will 4 subfolders, Period 1, Period 2 , Period 3, Period 4. but these will be created throughout, so for now I only have Period 1.  If today is a date is january 2 t will go to period 1. but when we reach the date of march 1 it will create the second folder period 2, and then any documents after this date I want them to go to period 2 folder and so on. 

What is the best way to approach this?

thanks in advance

  Discussion posts and replies are publicly visible

Parents
    1. Create your folder structure in advance. It sounds like every year will have 4 periods - 1,2,3 and 4. Each covers 3 months (from what can be assumed given the info you've provided). There's no reason to wait to create the subfolders. You could create folders for the next 100 years and be pretty sure that'll cover the life of your system. You could write a one-off utility process model to do this.
    2. You can then set up a Decision Rule to return the appropriate folder for the Year/Month combination. You can ease the burden a bit and only have 4 rows per year by a) using the "First - This decision returns outputs for the first match" option, b) matching exactly on the input year, and  < 4, < 7, <10, <13 in that order, like this:

    It'd be slow to set up all of the rows you need but once done it's done.

    3. The you simply derive the Year and Month from now() and use those values to return the relevant folder as input to your smart service

Reply
    1. Create your folder structure in advance. It sounds like every year will have 4 periods - 1,2,3 and 4. Each covers 3 months (from what can be assumed given the info you've provided). There's no reason to wait to create the subfolders. You could create folders for the next 100 years and be pretty sure that'll cover the life of your system. You could write a one-off utility process model to do this.
    2. You can then set up a Decision Rule to return the appropriate folder for the Year/Month combination. You can ease the burden a bit and only have 4 rows per year by a) using the "First - This decision returns outputs for the first match" option, b) matching exactly on the input year, and  < 4, < 7, <10, <13 in that order, like this:

    It'd be slow to set up all of the rows you need but once done it's done.

    3. The you simply derive the Year and Month from now() and use those values to return the relevant folder as input to your smart service

Children