CA Service Management

Expand all | Collapse all

BOXI(schedule)

  • 1.  BOXI(schedule)

    Posted May 26, 2014 11:04 PM

    Hi All,

    CASD12.7 BOXI R3.

    Wehave an scenario that the report needs to be delivered daily and the  daily report  should contains previous 7 days data from the current date the report is delivered.I have tried using this using "daily" schedule option but the report is delivering the last saved value not the exact previous 7 days value.(not taking dynamic date range according to the current date).
    Please advise.



  • 2.  RE: BOXI(schedule)

    Posted May 26, 2014 11:39 PM

    Hi Mohan,

    Is the issue with the out of the box crystal report or a custom WEBI report? If it is a custom WEBI report, then it would be better to use pdmtoday for the previous 7 days date filter. For example, PdmToday(-1,1,-1) and  PdmToday(1,7,-1).

    Thanks,
    Naveen



  • 3.  RE: BOXI(schedule)

    Posted May 26, 2014 11:45 PM

    Hi Naveen,

    Thanks for the reply. it is an customized webi report and can you please elaborate me how to get the pdm today today  in the  filter.

    Regards,

    Mohan



  • 4.  RE: BOXI(schedule)

    Posted May 27, 2014 11:17 PM

    Hi Naveen,

    I have tried using the pdm today function but iw ant to use time contraint in the filter.Is it possible to have time stamp inthe pdm today function I want to have the filter which will generate the data for the time period oof last day6AM to current day6AM.Can you please help me on the select query.thanks.



  • 5.  RE: BOXI(schedule)

    Posted May 28, 2014 02:50 AM

    Mohan,

    Below is the syntax for the pdmtoday function and see if you can try to do the time adjustments:

    PdmToday( [timeAdj [, day [, month [, year]]]] )

    When used with no arguments returns the current date. When used with  arguments, returns the current date in seconds from 1/1/1970 adjusted according to the arguments:

    timeAdj: -1 => adjust time to beginning of day (0:00:00);

                      +1 => adjust time to end of day (23:59:59)

             day:negative => adjust date by number of days specified

                     positive => set day to absolute value specified (or to

                                            last day of month, whichever is less)

          month:   negative => adjust date by number of months specified

                            positive => set month to absolute value specified (or to

                                                  December (12), whichever is less)

           year:    negative => adjust date by number of years specified

                    positive => set year to absolute value specified

         

    Adjustments are applied in the order year, month, day.  A zero or omitted argument is ignored. This function may be used anywhere in the query.

     

    If the adjustment does not work, then use pdmseconds function along with pdmtoday to see if it works. However, I did not test it and am not sure if it helps to achieve your requirement. Below is syntax for pdmseconds function:

    PdmSeconds(date)

    Returns the value of the date column specified in its argument in its raw form as the number of seconds from midnight January 1, 1970. This function can be used only in the selection list. Note that the argument is required.

     

    Thanks,
    Naveen



  • 6.  RE: BOXI(schedule)

    Posted Jun 03, 2014 12:00 AM

    Hi Naveen,

     

    I have used the below query to fetch the 6 AM to 6 AM constraint but not working properly it is fetching the whole day(both) data,

    @Select(Incident Detail\Open Date) BETWEEN PdmToday(-1, -1) AND
    PdmToday()

    Can you suggest me the time insertion in that query even i tried the following query but ended with some error.

    @Select(Incident Detail\Open Date) BETWEEN PdmToday(-1(6:00:00), -1(6:00:00)) AND
    PdmToday()

     

    please advise

     

     



  • 7.  RE: [CA Service Desk General Discussion] RE: BOXI(schedule)

    Broadcom Employee
    Posted Jun 03, 2014 10:36 AM
    Hi Mohan,

    I don’t think we allow time additions with in a timeADJ.

    I believe you could only do something like: select pdmtoday(-1,-7), pdmtoday(-1)

    Which gives you past 7 days (ie., beginning of day 7 days back until end of day last night). Then maybe some manipulations using pdmSeconds or some other native BOXI time functions would help to accommodate the 6 hours.

    _R



    From: CA Service Management Global User CommunityMessage Boards [mailto:CommunityAdmin@communities-mail.ca.com]
    Sent: Monday, June 02, 2014 11:00 PM
    To: mb_message.2276110.119066054@myca-email.ca.com
    Subject: [CA Service Desk General Discussion] RE: BOXI(schedule)


    Hi Naveen,



    I have used the below query to fetch the 6 AM to 6 AM constraint but not working properly it is fetching the whole day(both) data,

    @Select(Incident Detail\Open Date) BETWEEN PdmToday(-1, -1) AND
    PdmToday()

    Can you suggest me the time insertion in that query even i tried the following query but ended with some error.

    @Select(Incident Detail\Open Date) BETWEEN PdmToday(-1(6:00:00), -1(6:00:00)) AND
    PdmToday()



    please advise




    Posted by:mohansrinivas
    --
    CA Communities Message Boards
    119068594
    mb_message.2276110.119066054@myca-email.ca.com<mailto:mb_message.2276110.119066054@myca-email.ca.com>
    https://communities.ca.com


  • 8.  RE: [CA Service Desk General Discussion] RE: BOXI(schedule)

    Posted Jun 04, 2014 12:14 AM

    Hi Raghu,

     

    Thanks for your inputs. Can you pelase provide me the filter query which will fetch last 24 hours data.

     

    Regards,

    Mohan



  • 9.  RE: [CA Service Desk General Discussion] RE: [CA Service Desk General Discu

    Broadcom Employee
    Posted Jun 04, 2014 08:35 AM
    Hi Mohan,

    Try this: select pdmtoday(-1,-1), pdmtoday(-1)

    _R

    From: CA Service Management Global User CommunityMessage Boards [mailto:CommunityAdmin@communities-mail.ca.com]
    Sent: Tuesday, June 03, 2014 11:14 PM
    To: mb_message.2276110.119262969@myca-email.ca.com
    Subject: [CA Service Desk General Discussion] RE: [CA Service Desk General Discussion] RE: BOXI(schedule)


    Hi Raghu,



    Thanks for your inputs. Can you pelase provide me the filter query which will fetch last 24 hours data.



    Regards,

    Mohan
    Posted by:mohansrinivas
    --
    CA Communities Message Boards
    119265509
    mb_message.2276110.119262969@myca-email.ca.com<mailto:mb_message.2276110.119262969@myca-email.ca.com>
    https://communities.ca.com


  • 10.  RE: BOXI(schedule)

    Broadcom Employee
    Posted Jun 05, 2014 02:26 AM

    Hi Mohan,

    As Naveen mentioned, the pdm date functions return an integer value of seconds.

    So you can adjust the date value base on seconds.

    for example:

    from the 24 hours ago till now -->  BETWEEN (PdmToday()-24*3600) and PdmToday()

    from yesterday 6am to 6pm --> BETWEEN (PdmToday(-1, -1) + 6*3600) and (PdmToday(-1, -1) + 18*3600)
     

     

    Regards,

    Mark
     



  • 11.  RE: BOXI(schedule)

    Posted Jun 05, 2014 02:31 AM

    Hi Raghu and MArk,

     

     

    Thanks for your valuable feedback. I will try to implement this and let you know the result. can you pelase specify the query for yesterday 6 am to today 6 am.

     

    Regards,

    Mohan



  • 12.  RE: BOXI(schedule)

    Broadcom Employee
    Posted Jun 05, 2014 02:35 AM

     yesterday 6 am to today 6 am --> BETWEEN (PdmToday(-1, -1) + 6*3600) and (PdmToday(-1)+6*3600)



  • 13.  RE: BOXI(schedule)

    Broadcom Employee
    Posted Jun 05, 2014 02:41 AM
    zhihe01:

     yesterday 6 am to today 6 am --> BETWEEN (PdmToday(-1, -1) + 6*3600) and (PdmToday(-1)+6*3600)


    the following is the same:

    BETWEEN (PdmToday(-1, -1) + 6*3600) and (PdmToday(-1, -1) + (6+24)*3600)

     



  • 14.  RE: BOXI(schedule)

    Posted Jun 05, 2014 02:43 AM

    Thanks a lot for your help Mark



  • 15.  Re: BOXI(schedule)

    Broadcom Employee
    Posted Jun 20, 2014 05:05 PM

    Hi Mohan,

     

    Did Mark's suggestion help you resolve this, if so, may I request you to mark this Resolved?

     

    Thx

    _R



  • 16.  RE: [CA Service Desk General Discussion] RE: BOXI(schedule)

    Broadcom Employee
    Posted Jun 05, 2014 09:10 AM
    Great find Mark

    From: CA Service Management Global User CommunityMessage Boards [mailto:CommunityAdmin@communities-mail.ca.com]
    Sent: Thursday, June 05, 2014 1:26 AM
    To: mb_message.2276110.119492239@myca-email.ca.com
    Subject: [CA Service Desk General Discussion] RE: BOXI(schedule)


    Hi Mohan,

    As Naveen mentioned, the pdm date functions return an integer value of seconds.

    So you can adjust the date value base on seconds.

    for example:

    from the 24 hours ago till now --> BETWEEN (PdmToday()-24*3600) and PdmToday()

    from yesterday 6am to 6pm --> BETWEEN (PdmToday(-1, -1) + 6*3600) and (PdmToday(-1, -1) + 18*3600)




    Regards,

    Mark

    Posted by:zhihe01
    --
    CA Communities Message Boards
    119494779
    mb_message.2276110.119492239@myca-email.ca.com<mailto:mb_message.2276110.119492239@myca-email.ca.com>
    https://communities.ca.com


  • 17.  Re: BOXI(schedule)

    Posted Nov 25, 2014 02:40 PM

    not sure if you got the solution or not. but when i schedule a report and have to show last 7 days data (lets say opened in last 7 days) i use the below:

     

    ( in.open_date ) > PdmAddDays(-7)

     

    if you want last 30 days change -7 to -30 and so on.