CA Service Management

 View Only
  • 1.  PDM_LIST comparing current date server

    Posted Nov 27, 2015 03:55 PM

    Hello guys,


    I'm doing an HTMPL form and need to make a PDM_LIST comparing the value of a date attribute of an object with the time of SDM server. Example below:

     

    <PDM_LIST prefix=list factory=cnote where="close_date \>= [server_time]" >

     

    I've tried to use the functionality of "timespan" tool but it does not meet this need because I have to compare this attribute with the exact time server. And it is unfortunately not possible to create a timespan which is updated every minute. The minimum is 10 minutes.


    Also did not find variables the API to return the server time.
    If anyone can help me in this difficulty, I would be grateful. In particular expert users cdtj (Timur) and @Gutis (Giedrius) who know enough about it.

     

    Thanks TMACUL by help.

     



  • 2.  Re: PDM_LIST comparing current date server

    Posted Nov 30, 2015 02:33 AM

    Hi Daniel,

    could you provide more information about your goal?

    There is a way to get current server date in async query via WebEngine OP + Spel,

    but if you're modifing HTMPL why not to get values for predefined period of time and then postvalidate them via JS?

    Regards,

    cdtj



  • 3.  Re: PDM_LIST comparing current date server

    Posted Nov 30, 2015 02:59 AM

    Hi CDTJ

     

    Can you please respond me on my post.? Need your suggestion

     

    https://communities.ca.com/message/241844073?et=watches.email.thread#241844073



  • 4.  Re: PDM_LIST comparing current date server

    Posted Nov 30, 2015 07:22 AM

    Hi cdj,
    I know how to do this through OP and JS, but the problem is I need to pass this date parameter in the form load for the PDM_LIST function properly. I have also tried to make a javascript variable feed a PDM_SET variable, but failed.
    I need this functionality because I'm customizing the bin_form_np.htmpl form (ads) and I'd like some messages only be displayed on the day and time scheduled. I created a custom attribute to it (z_dat_open_date).
    If you need any more information, let me know. Thank you.



  • 5.  Re: PDM_LIST comparing current date server
    Best Answer

    Posted Nov 30, 2015 07:37 AM

    I think this is task for Attached Events,

    as I represent this:

    - create 2 attached event templates with 2 macros;

    - macro will switch extra message visibility;

    - special message scheduler is defined as z_start_date and z_end_date; (or start and length)

    - once date is changed event will attach with fire time at specified date;

    - event and macro could be created for cnote without any hard customization, directly from dbload (userload) or Source code in browser;

     

    Regards,

    cdtj