CA Service Management

 View Only
  • 1.  PDM_LIST Help

    Posted Aug 08, 2016 01:11 PM

    Hi team,

    I need make a PDM_List passing parameters in where clause.

    Its possible to make ?

     

    My Code

    var form2 = document.main_form;

    var mapPersid = ("cnt:"+form2.elements["SET.requested_by"].value);

    <PDM_LIST  PREFIX=listS FACTORY=sdsc_map WHERE = "map_persid= '"+mapPersid +"' ">

                    //code here

     

    </PDM_LIST>

     

     

    Thanks.



  • 2.  Re: PDM_LIST Help
    Best Answer

    Posted Aug 08, 2016 02:27 PM

    This will never works, let me explain you why.

     

    <PDM_LIST> is a server-side language. It means that it will be processed by the SDM webserver, and not the client browser. On the other hand, "var mapPersid" is a Javascript variable, which only exist on the client-side. (Just take a look at the source code of a rendered form, it only contains JS. Which is generated by the webserver, based on the pdm_*** controls)

     

    So the short explanation is : var mapPersid does not exist on the webServer when it renders your form.

     

    This is the exact same thing as PHP and JS or ASP.net and JS.

     

    If you want to do a pdm_list, and use the requested_by as a where clause, this should do the trick :

     

    <PDM_LIST  PREFIX=listS FACTORY=sdsc_map WHERE = "map_persid= '$args.requested_by.persistent_id'">

     

     

    Hope this clarifies,

     

    Pier