CA Service Management

 View Only
Expand all | Collapse all

How can I define dropdown field in text_api.cfg file located in site folder?

  • 1.  How can I define dropdown field in text_api.cfg file located in site folder?

    Posted May 23, 2023 02:37 AM
    Edited by Ankit Kumar May 23, 2023 03:16 AM

    Hi Team,

    I have set up CA SDM 17.3 on windows server 2016. Mailserver has been configured and incidents and Requests have been creating/updating successfully with Email.

     

    I have created a custom dropdown field (zserver_type, SREL to zsp_server_type table) on Request detail page. I want to know how can I define this field in text_api.cfg file located in site folder.
    And how can I update it via Email.

    Thanks in advance



  • 2.  RE: How can I define dropdown field in text_api.cfg file located in site folder?

    Broadcom Employee
    Posted Aug 17, 2023 09:26 AM
    Hi Ankit,
     
    Lets consider the following three assumptions:
     
    1. Assuming there is a custom field on OBJECT cr called
           zsrvr_typ SREL zservertype
     
    2. Assuming the zservertype table has the following structure
    OBJECT zservertype {
    ATTRIBUTES zservertype {
        sym STRING 20;
        last_mod_dt DATE { ON_CI SET NOW; };
        last_mod_by SREL cnt { ON_CI SET USER;
                               ON_NEW DEFAULT USER; };
      };
      FACTORY zservertype {
        STANDARD_LISTS {
          MLIST OFF;
          RLIST OFF;
        };
        REL_ATTR id;
      };
    };
     
    3. The entries in zservertype table has 
     
    id       sym
    1001   Windows
    1002   Linux
    1003   UNIX
    1004   AIX
    1005   IBM
     
    In Order to update this field via Maileater, do the following:
     
    • Add an entry like the below in text_api.cfg file
    REQUEST.SERVER_TYPE=zsrvr_typ.INTEGER.lookup_zservertype
     
    • Create a custom.spl file and add the following below:
     
    int lookup_zservertype( string inval, ...)
    {
        return fetch_dob_int( "zservertype", format("sym = '%s'", inval),
                              "sym", "id", inval);
    }
     
    • Restart the services or bounce the daemons spelsrvr and text_nxd using commands pdm_bounce spel and pdm_bounce text.
    • To create a request with server type as Linux, send an email to Mailbox with the body as:

    %DESCRIPTION=Test Description

    %SERVER_TYPE=Linux

    Regards,

    Rajesh Chitrapu