CA Service Management

 View Only
  • 1.  dtlDateDropdown control usage

    Posted Jan 20, 2016 05:59 PM

    Hi everyone,


    Did anyone already put a dtlDateDropdown control in a detail form using WSP? This control makes a field similar to call back date/time in detail_cr.htmpl form (but this field is defined by a Javascript function). I'm having trouble to define additional values in codename parameter. How I do it?


    Here's the description of codename parameter from dtlDateDropdown page on Wiki:


    Specifies the name of a set of values from the ui_selection object that are displayed in the date drop-down control. The values are those values with code attributes that match the value specified for codename.

    But I'm still not getting it. An example of use could be a great help here.


    Any ideas?

  • 2.  Re: dtlDateDropdown control usage
    Best Answer

    Posted Jan 21, 2016 12:45 AM

    Hi, as i understand those codes are stored in ui_selection_values factory. You can extract them by using pdm_extract usp_ui_selection_values. I think codename =callbackDates are the only one that should be interesting to you.

    TABLE usp_ui_selection_values

    code del id last_mod_by last_mod_dt text value

    {"callbackDates" ,"0" ,"11043" ,"" ,"" ,"In one day" ,"86400" }

    {"callbackDates" ,"0" ,"11044" ,"" ,"" ,"In two days" ,"172800" }

    {"callbackDates" ,"0" ,"11045" ,"" ,"" ,"In one week" ,"604800" }

  • 3.  Re: dtlDateDropdown control usage

    Posted Jan 21, 2016 09:43 AM

    Nice! Did some tests here, by adding new lines with a new codename, and it worked! I never would have guessed that it was here. Thank you very much!


    Some things I wondered:

    • I noted that usp_ui_selection_values has other values, but are they really used (or this table is deprecated)? If you verify in detail_cr.htmpl, the call back date/time does not get its values from this table (it even uses PDM_MACRO, it's just javascript).
    • Why call back date/time does not use dtlDateDropdown Pdm_macro? Did it used before?
    • There is a usp_ui_selection table too, is this table necessary? Where it is used?

  • 4.  Re: dtlDateDropdown control usage

    Posted Jan 21, 2016 01:57 AM


    here is some common information that could help you in future, if you get stuck with pdm_macro attributes:


    previously, until sdm 12.5 as I remember, there was possibility to customize PDM_MACRO attributes by putting custom *.mac files into site\mods\majic folder,

    but then this were deprectated, but you still can find PDM_MACRO sources in SDM\sapmples\macro folder, for example dtlDateDropdown looks like:

    // dtlDateDropdown.mac
    // @(#)$Id: dtlDateDropdown.mac ASPEN.1 2010/10/12 15:01:48 bolas01 Exp $"
    //    Specifies a date dropdown with static list of dates on an HTMPL detail form:
      hdr = "$args.&{attr}.DISPLAY_NAME" // The text of the header.
      attr         // The name of the attribute.  Required.
      colspan = 1 // The number of columns on the form
      size = 20   // The width of the input box
      make_required = "no"  //not for general use.Makes a field REQUIRED on the form regardless of whether it is REQUIRED in the object/database layer.
      evt = ""        // Event handler string
      codename = "" // Name of code
    <PDM_IF "&{evt}" != "">
    <PDM_IF "&{make_required}" == "yes">
    <PDM_IF "&{codename}" != "">
    <PDM_LIST prefix="list" FACTORY="ui_selection_values" WHERE=" delete_flag = 0 AND code = '&{codename}'">

    as Gutis described before, you can notice that values are fetching via PDM_LIST function.


    Going this way you can notice that some attributes (like id=string in dtlDropdown ) are constant and aren't passes to js function,

    so you can define them only via javascript instead of regular PDM_MACRO.


    PS: I haven't tried this yet, but I think there is still possibility to customize PDM_MACRO attributes, as they are described and editable in pdmMacro table in SDM:





  • 5.  Re: dtlDateDropdown control usage

    Posted Jan 21, 2016 09:48 AM

    Glad to know this. In fact, I was just thinking in doing a customization in this field, but I'm seeing now that it would require modifying this mac file and the javascript function (detailDateDropdown), so I gave up the idea...


    But knowing will be useful to check PDM_MACROS in the future. Thanks!