CA Service Management

Expand all | Collapse all

Creating a mapping between a timestamp and respective quarter in Data Loading form

  • 1.  Creating a mapping between a timestamp and respective quarter in Data Loading form

    Posted Apr 20, 2018 07:36 AM

    Hi all,

     

    For one of my customer, there are few SLAs which will get data from Data Loading Form. It is because there is no direct source which can feed those SLAs automatically.

     

    In Data Loading Form, we supply a record submission timestamp which is further linked to timestamp in output table in Mapping stage. My business requirement is while submitting the record, when the timestamp is placed in the data form, then a automatic quarter should be selected. Quarter selection should not be manual as I have given a drop down field for Quarter.

    For ex. if I give any date of Jan18, Feb18 or March18, then Q1 gets selected, if date is of Apr18, May18 or June18 then Q2 gets selected, if date is of Jan19, Feb19 or Mar19 then Q5 gets selected and so on.

    By doing so, customer wants to avoid any kind of manual/human error in selecting quarter. Though the quarter selection is used only on UI only. It is not getting consumed anywhere in backend or Business Logic.  Hope I am making sense. 

     

    So just want to know if such kind of date vs Quarter mapping is possible in Data forms.

    Can we create one or two tables in backend for mapping of date and quarter and then using some translation script, we populate the appropriate quarter.

     

    Please share your thoughts on this.

     

    Regards,

    Kuldeep Bhargava

    bhaku04



  • 2.  Re: Creating a mapping between a timestamp and respective quarter in Data Loading form

    Broadcom Employee
    Posted Apr 24, 2018 09:12 AM

    Hi Kuldeep,

     

    as we discussed outside the Communities, an Adapter could do this with a SQL select of the month that would then map each month via a translation table, but I'm not aware of a way to do it in a Data Loading Form directly, sorry.

     

    Does anyone else have a suggestion?

     

    Iain



  • 3.  Re: Creating a mapping between a timestamp and respective quarter in Data Loading form

    Posted Apr 24, 2018 02:09 PM

    You do not need a table in SQL to do this

     

    CEILING(MONTH(date) / 3.0) AS quarter



  • 4.  Re: Creating a mapping between a timestamp and respective quarter in Data Loading form

    Posted Apr 24, 2018 02:12 PM

    Just re-read your question and why is it that you have Quarter 5?

     

    Quarter means divided by 4.

     

    There is no fifth quater in a year. 



  • 5.  Re: Creating a mapping between a timestamp and respective quarter in Data Loading form

    Posted Apr 25, 2018 07:11 AM

    Hi,

    Service management contract is of 5 years and it is divided into 20 quarters.

    So instead of having Q1-2018, Q2-2018,Q3-2018, Q4-2018 and then Q1-2019 and so on, quarters simply named as Q1, Q2....Q5,Q6..Q19 & Q20.

    I learnt it from my manager that this is the correct way of representing quarters in SLM.

     

    Regards,

    Kuldeep Bhargava

    bhaku04



  • 6.  Re: Creating a mapping between a timestamp and respective quarter in Data Loading form

    Posted Apr 25, 2018 07:35 AM

    Can you ask your manager for some litterature just for my own consciousness please?

     

    And for your use case, 

     

    declare @contractStartDate DATE
    declare @contractEndDate DATE
    declare @actualDate DATE

    set @actualDate = GETDATE()
    set @contractStartDate = '2017-01-01'
    set @contractEndDate = '2021-12-31'

    select
    ceiling((datediff(MM,@contractStartDate,@actualDate)+1) / 3.0) Actual_quarter,
    ceiling((datediff(MM,@contractStartDate,@contractEndDate)+1) / 3.0) Max_Quarter



  • 7.  Re: Creating a mapping between a timestamp and respective quarter in Data Loading form

    Posted Apr 25, 2018 10:17 AM

    Hi,

     

    I will try to get the document if available.

    Where this piece of code should be used in Data Loading Form.

    Because my requirement is to create mapping in the Data Forms. In Data form we are capturing records for few SLAs and taking a timestamp (which is considered as submission timestamp) and want to map that timestamp with quarters.

     

    Regards,

    Kuldeep



  • 8.  Re: Creating a mapping between a timestamp and respective quarter in Data Loading form

    Broadcom Employee
    Posted Apr 25, 2018 10:29 AM

    Hi Kuldeep,

     

    There's nowhere in the DLF itself, but where are you using this Quarter info? Because if it's part of the metric, it could be calculated in the Business Logic after the fact.

     

    Iain



  • 9.  Re: Creating a mapping between a timestamp and respective quarter in Data Loading form

    Posted May 01, 2018 10:04 AM

    This quarter info is for UI purpose only. So that user know for which quarter data is being submitted.

    It is not a part of any metric. In metric it shows as Q1-2018,Q2-2018, Q1-2019 etc.

     

    Regards,

    Kuldeep 

    Bhaku04



  • 10.  Re: Creating a mapping between a timestamp and respective quarter in Data Loading form

    Broadcom Employee
    Posted Apr 25, 2018 06:03 AM

    Hi Kuldeep,

     

    As Pier pointed out, what is your logic behind holding a Q5 in this case? How is this justified?



  • 11.  Re: Creating a mapping between a timestamp and respective quarter in Data Loading form

    Posted Apr 25, 2018 07:10 AM

    Hi,

    Service management contract is of 5 years and it is divided into 20 quarters.

    So instead of having Q1-2018, Q2-2018,Q3-2018, Q4-2018 and then Q1-2019 and so on, quarters simply named as Q1, Q2....Q5,Q6..Q19 & Q20.

    I learnt it from my manager that this is the correct way of representing quarters in SLM.

     

    Regards,

    Kuldeep Bhargava

    bhaku04