CA Service Management

  • 1.  In SDM new customized field need to be created with values(schema designer).

    Posted Jan 22, 2019 02:40 AM

    Hi ,

     

    I am trying to create risk level dropdown with values like high , medium and low, if the value is medium and high some more text and check box field need to be added for more details as shown below. For populating the risk level values i have  created Zrisk_level table with sym and delete_flag column, for any changes and publish in wsp i am facing this below error. Kindly help on this issue. I am facing problem in populating the risk levels in the dropdown. And I tried to use the default risk level table for values also, but it didn't work.

     

    <PDM_MACRO name=dtlStartExpRow label="Details of Risk" colspan=6 exp_rows="1,2,3" form_name="detail_chg">
    <PDM_MACRO name=dtlStartRow>
    #<PDM_MACRO name=dtlDropdown hdr="Risk Level" attr=risk_level link=yes>((( here i am facing issue)))
    <PDM_MACRO name=dtlStartRow>
    <PDM_IF "$args.sym" == "1-Extreme">
    <PDM_MACRO name=dtlTextbox hdr="Description of Risk" attr=zrisk_description colspan=3 keeplinks=yes rows=4 size=120 spellchk=yes>
    <PDM_MACRO name=dtlStartExpRow label="Security Risk" colspan=6 exp_rows="1,2,3,4,5,6,7" form_name="detail_chg">
    <PDM_MACRO name=dtlCheckbox hdr="OS Security" attr=zosecurity off="No" on="Yes">
    <PDM_MACRO name=dtlCheckbox hdr="Network Security" attr=znetsecurity off="No" on="Yes">
    <PDM_MACRO name=dtlCheckbox hdr="Application Security" attr=zappsecurity off="No" on="Yes">
    <PDM_MACRO name=dtlCheckbox hdr="Information Security" attr=zinfosecurity off="No" on="Yes">
    <PDM_MACRO name=dtlCheckbox hdr="Others" attr=zother off="No" on="Yes">
    </PDM_IF>

     

     

     

     

    In change order this popup 

     

    Please required your help on this.

     

    Best Regards.

    Ashu



  • 2.  Re: In SDM new customized field need to be created with values(schema designer).

    Posted Jan 22, 2019 03:59 AM

    Hi Ashu,

    1. That WSP error usually means that someone has done a 'Save and Publish' from WSP, but hasn't run the pdm_publish utility.  Have you tried running the pdm_publish utility? Does it succeed?  If pdm_publish fails, what error messages do you get?

    2. When you successfully publish your schema mod to add the Zrisk_level table, I presume you will also add a field 'Zrisk_level' to the CHG object and make it an SREL to the new table Zrisk_level.  If that is the case, change the dtlDropdown for 'Risk Level' to use 'attr=Zrisk_level'.

    3. To make fields 'zrisk_description' and the checkboxes mandatory when 'Zrisk_level' is set to particular values - this can't be done dynamically with a PDM_IF.  The logic in the 'PDM_IF' is evaluated once when the form is first loaded and it is not re-evaluated until the form is re-loaded, which happens when the form next goes into or out of Edit mode.  The '$args' collection refers to the fields of the CHG record, not to the Zrisk_level.  You need to use Javascript to change the properties of one field based on the contents of another one.  See this example: Make text field required when check box is checked and note that the name of the function can also be 'preSaveTrigger2' - as in this example: https://communities.ca.com/message/242023392-re-how-can-i-prompt-that-a-incident-ticket-field-is-required?commentID=2420… .

    4. Please be aware that javascript additions are not supported by CA Tech Support.  The CA Community will usually help out but does not provide guaranteed levels of support.

     

    Regards,

    James



  • 3.  Re: In SDM new customized field need to be created with values(schema designer).

    Posted Jan 22, 2019 06:29 AM

    Hi James,

     

    Thanks for the suggestion, I have given attribute of risk instead of zrisk_level, now I am getting the dropdown option, but finding some error while executing pdm_publish.

     

     

     

     

     

    I need help on  pdm if statement for this requirement.

     

    Regards,

    Ashu



  • 4.  Re: In SDM new customized field need to be created with values(schema designer).

    Posted Jan 22, 2019 08:31 PM

    Hi Ashu,

    Please attach the contents of <installdir>\site\mods\wsp_schema.sch.

    Regards,

    James



  • 5.  Re: In SDM new customized field need to be created with values(schema designer).

    Posted Jan 22, 2019 11:39 PM
      |   view attached

    Hi James,

     

    Please find the attached file.

     

     

    Regards,

    Ashwini M

    9148925765

    Attachment(s)

    zip
    wsp_schema.sch.zip   697 B 1 version


  • 6.  Re: In SDM new customized field need to be created with values(schema designer).

    Posted Jan 23, 2019 12:00 AM

    Hi Ashu,

    I see this in the schema file:

    TABLE ZRisk_level {
      id    INTEGER UNIQUE KEY;
      last_mod_dt     LOCAL_TIME;
      last_mod_by     UUID REF ca_contact;
      delete_flag    INTEGER REF Boolean_Table UNIQUE;
      sym    STRING 60 UNIQUE;
    }

    ... so the delete_flag is currently defined as a unique index for ZRisk_level, which is not workable.

     

    A couple of suggestions:

     

    1. I would normally set 'delete_flag' as an SREL to 'actbool' (Active_Boolean) rather than to 'bool' (Boolean_Table), as that is how nearly all of the out-of-box reference tables are defined (look at the 'delete_flag' in WSP for acctyp, closure_code, crs) and your table will then behave similarly to other reference tables.

     

    2. In WSP, for your 'delete_flag', clear the 'DBMS Index Options / Unique' flag and set the 'Required' flag. Under 'On New Default Value', enter 0 as the default.  This is the pattern for most out-of-box reference tables.  Save, publish, run pdm_publish again.  You may find that the 'save and publish' fails because pdm_publish failed previously.  If so, please get back to me :-).

     

    Regards,

    James