CA Service Management

 View Only
  • 1.  PDM_IF write for "Update Members" button

    Posted Feb 14, 2017 07:59 AM

    Hi,

    I want to put the condition for the "Update Members" button.
    I just want the group administrators to do this.
    I wrote the following code for detail_cnt.htmpl. But I can not run list_grpmem.hmtpl.
    How do I update the Update Members button only for users with manager_flag = 1?


    ***detail_cnt.hmtpl
    <PDM_IF "$args.id" != "">
    <PDM_LIST PREFIX=list1 FACTORY=grpmem where="group = U'$args.id' AND member= U'$cst.id'" ESC_STYLE=JS2>
    <PDM_IF "$list1.manager_flag" == "1">
    //<PDM_MACRO name=button Caption="Edit[d]" Func="detailEdit()" hotkey_name="Edit[d]" ID="btn001">//
    </PDM_IF>
    </PDM_LIST>
    </PDM_IF>
    ***

    ***list_grpmem.htmpl

    <PDM_IF ????>
    <SCRIPT LANGUAGE="JavaScript">
    var rptName = new Array("", "");
    var cfgCanEdit = true;
    var autoRefreshWindows;
    if( window.parent != null &&
    typeof window.parent.updateMemOrGroup == "string" &&
    typeof window.parent.updateMemOrGroupShowBool == "boolean" && window.parent.updateMemOrGroupShowBool &&
    typeof window.parent.updateMemOrGroupButtonLabel == "string" &&
    typeof window.parent.updateMemOrGroupMethod == "string" )
    {
    autoRefreshWindows = new Object();
    cfgExtraButton = new Array(window.parent.updateMemOrGroupButtonLabel, window.parent.updateMemOrGroupMethod);
    }
    </SCRIPT>

    </PDM_IF>

    ***

    Thank you for your help
    Regards
    Ozge Ozturk



  • 2.  Re: PDM_IF write for "Update Members" button

    Posted Feb 14, 2017 08:54 AM

    Hi, the solution from this thread might work for you. You'll need to change the where clause to check group manager. 

     

    PDM_LIST menubar_sd.htmpl condition