Customer Portal

Using dynamic file names in UniversalDataWriter

Comments 7

  • Avatar
    imriskal
    0
    Comment actions Permalink
    Hello Sreehareesh,

    This goal can be achieved very easily using parameters.

    1. Create new parameter TODAY with value `date2str(today(),"yyyy-MM-dd")` (Note that I have used back quotes syntax allowing me to use CTL1 functions within parameters.)
    2. Set File URL in UniversalDataWriter to ${DATAOUT_DIR}/output-${TODAY}.txt
    3. The result file is in data-out directory and it is named output-2014-02-06.txt

    Is this solution sufficient for you?

    Kind regards,
  • Avatar
    kmsrihari
    0
    Comment actions Permalink
    Hi,

    It makes perfect sense!
    Now I'm able to get it worked with your solution.
    Thanks a lot for your valuable help.

    Thanks,
    Sreehareesh
  • Avatar
    rz4qk4
    0
    Comment actions Permalink
    Hi,
    I also would like to use the some solution, but wanted to have different date (ex: today+1 or today-1), I tried by using others date function to apply in your solution with value `date2str(dateAdd(today(),1,day),"yyyyMMdd")` but failed, any suggestion?

    Thanks,
    Michael.
  • Avatar
    imriskal
    0
    Comment actions Permalink
    Hello Michael,

    Please note that CTL1 has to be used in parameters. And in CTL1, the name of dateadd function is defined with lower case "a" as opposed to CTL2 where dateAdd is defined with upper case "A". Change this one character and your expression should be ok.

    Regards,
  • Avatar
    rz4qk4
    0
    Comment actions Permalink
    Hi,

    It's work perfectly fine now, thanks~

    Michael.
  • Avatar
    siddhant
    0
    Comment actions Permalink
    hi guys,

    i want to dynamically attach a id from a database or to my http file URL
    can some body pls help
  • Avatar
    slechtaj
    0
    Comment actions Permalink
    Hi,

    I believe this question was answered as part of this thread. Or is there anything else you need to clarify?

Please sign in to leave a comment.