CA Service Management

  • 1.  PDM_LIST Query

    Posted Jun 08, 2015 12:15 AM

    Hi Team,

     

    I am using PDM_LIST in the following manner:

    <PDM_LIST PREFIX=ci WHERE="id > 0" FACTORY=loc>

     

    Now according to the condition given, it will always fetch all the records from the database. Due to this, my page has gone slow.

     

    I am accesing the selected site in a variable as shown:

    var site_value=document.main_form.elements["SET.zsitelookup"].value;


    Now my concern is that I want to change the condition in the PDM_LIST to fetch only those records, where the site id is equal to the value stored in the site_value variable. I want to change the condition WHERE="id > 0" to something like WHERE="site = site_value". Please tell me the syntax for this.


    Regards,

    Balram



  • 2.  Re: PDM_LIST Query

    Posted Jun 08, 2015 06:42 AM

    Hi,

    if your zsitelookup value is known before page loads, you can use this whereclause:

    <PDM_LIST PREFIX=ci WHERE="site='$args.zsitelookup'" FACTORY=loc>


    Regards,

    cdtj



  • 3.  Re: PDM_LIST Query

    Posted Jun 08, 2015 06:56 AM

    It is giving parsing error in wsp session.



  • 4.  Re: PDM_LIST Query

    Posted Jun 08, 2015 07:02 AM

    What's type of your field? SREL to site table?

    Checked, site is external key is integer, this should work:

    <PDM_LIST PREFIX=ci WHERE="site=$args.zsitelookup" FACTORY=loc>


    Or to avoid error you can use:

    <PDM_IF "$args.zsitelookup" != "">

    <PDM_LIST PREFIX=ci WHERE="site=$args.zsitelookup" FACTORY=loc>

    ...

    </PDM_LIST>

    <PDM_ELSE>

    <PDM_LIST PREFIX=ci WHERE="id is not NULL" FACTORY=loc>

    ...

    </PDM_LIST>

    </PDM_IF>




  • 5.  Re: PDM_LIST Query

    Posted Jun 08, 2015 07:09 AM

    I think the only way to get, by user input filtered, object list is to use REST API