CA Service Management

 View Only
  • 1.  Dropdown With Fixed Values On Change Order Search form (list_chg.htmpl)

    Posted May 28, 2023 05:30 PM

    Hello,

    I have set organization as a dropdown on the Create New Change Order form (detail_chg.htmpl) via this code:

    <PDM_MACRO name=dtlDropdown hdr="Organization" attr=organization link=yes whereclause=" (name='Amazon') or (name='Apple') or (name='Microsoft') or (name='Twitter')" make_required=yes>

    How can I have the same dropdown and fixed organization values on the Change Order Search form (list_chg.htmpl) ? I'm assuming I need to leverage the searchFilterDropdown function, can anyone assist with my example?

    Thanks
    Stuart



  • 2.  RE: Dropdown With Fixed Values On Change Order Search form (list_chg.htmpl)
    Best Answer

    Posted May 29, 2023 04:53 PM

    Hey Stuart,

    There is no feature for that in the sfDropdown but there is in the sfLookup.

    Take a look in list_all_lr.htmpl for an example. There is an sfLookup there that uses the extraURL parameter to incorporate an ADDITIONAL_WHERE.



    ------------------------------
    Lindsay Estabrooks
    Principal Consultant
    IT-EDU Consultants LLC
    ------------------------------



  • 3.  RE: Dropdown With Fixed Values On Change Order Search form (list_chg.htmpl)

    Posted Jun 26, 2023 05:53 AM
    searchFilterDropdown("Organization", "organization", ""
    	<PDM_LIST PREFIX=list WHERE="name in ('Amazon', 'Apple', 'Microsoft', 'Twitter')" FACTORY=org ESC_STYLE=JS2>
    		,"$list.COMMON_NAME","$list.REL_ATTR"
    		<PDM_IF "$list.COMMON_NAME" == "">
    			,"<selected>"
    		</PDM_IF>
    	</PDM_LIST>	
    , 1);