CA Service Management

 View Only
  • 1.  Issues getting field look up working in List edit view

    Posted Mar 17, 2013 05:33 PM
      |   view attached
    Hello All,

    This is my first post so please let me know if I need to provide any additional info

    Environment:
    Product: CA Service Desk Manager
    Version: 12.1

    I'm trying to edit the list_cr, list_in and list_pr forms to include a new fields into the eidt in list section.

    I have managed to insert the field but am having issues getting it to work correctly.

    The code block that I'm working is this:
    </SCRIPT>
    <PDM_FORM NAME="frmFID">
    </PDM_FORM>
    <PDM_IF "${current:n/a}" != "n/a">
    <SCRIPT LANGUAGE="JavaScript">
    <pdm_jscript file=list_edit.js>
    startListEdit(__search_filter);
    listEditStartRow();
    listEditReadonly("ref_num","Request #");
    listEditField("status");
    listEditField("category.sym","Request Area");
    <!--listEditField("priority");-->
    listEditField("parent.ref_num");
    listEditField("caused_by_chg.chg_ref_num");
    listEditField("assignee");
    listEditEndRow();
    listEditReadonly("summary",4);
    endListEdit();
    the particular line that i have added was "listEditField("category.sym","Request Area");"

    I have tried the above and "listEditField("category","Request Area");", each with their own problems.

    The Category.Sym will give me the link to look up a new category but doesn't pull in the existing one form the ticket - it also gives an error to say "The Following list edit attributes cannot be edited because they were not found in the results set: Category.sym"
    When I use just Category - I don't get the error and it does pull in the existing category from the ticket - however, it doesn't provide the link back to the category list.

    I'm at a list on this one as when I look at the other fieds - there is nothing special about them to have them set with a link.

    If anyone has managed to include this field previously or knows why I'm having the issues that I am - any assistance that can be provided would be greatly appreciated.

    I have also attached a screen shot to show the visual affects of each attempt above.


  • 2.  RE: Issues getting field look up working in List edit view
    Best Answer

    Posted Mar 17, 2013 09:16 PM
    Just advising that we have figured this out now - maybe something that will come in useful for others.

    It seems that the original code that I had was actually correct, the error was due to the field in the list view not match that in the edit section.
    </SCRIPT>
    <PDM_FORM NAME="frmFID">
    </PDM_FORM>
    <PDM_IF "${current:n/a}" != "n/a">
    <SCRIPT LANGUAGE="JavaScript">
    <pdm_jscript file=list_edit.js>
    startListEdit(__search_filter);
    listEditStartRow();
    listEditReadonly("ref_num","Request #");
    listEditField("status");
    listEditField("category.sym","Request Area");  <!-- THE ATTRIBUTE REFERENCE HERE NEEDS TO MATCH THE REFERNCE BELOW  -  ie Category.sym  -->
    <!--listEditField("priority");-->
    listEditField("parent.ref_num");
    listEditField("caused_by_chg.chg_ref_num");
    listEditField("assignee");
    listEditEndRow();
    listEditReadonly("summary",4);
    endListEdit();
    
    <!---- ##I HAVE REMOVED SOME OF THE CODE BETWEEN THESE TO SECTIONS AS WAS NOT RELEVANT ## --->
    
     <pdm_macro name=lsWrite both=yes text="}">
    
    <PDM_MACRO NAME=lsCol hdr="Status" attr=status>
    
    <PDM_MACRO NAME=lsCol hdr="Open Date" attr=open_date>
    
    <PDM_MACRO NAME=lsCol hdr="External Ref #/Parent" attr=extern_ref>
    
    <PDM_MACRO NAME=lsCol hdr="Request Area" attr=category.sym>   <!--  THE ATTRIBUTE REFERENCE HERE NEEDS TO MATCH THE REFERNCE ABOVE - ie Category.sym   -->
    
    <PDM_MACRO NAME=lsCol hdr="Group/Caused by Change Order" attr=group>
    
    <PDM_MACRO NAME=lsCol hdr="Contacts" label="Assignee" attr=assignee>
    
    <PDM_MACRO NAME=lsCol attr=summary startrow=yes colspan=summary_colspan>
    
    <PDM_MACRO NAME=lsCol attr=parent.ref_num>
    
    <PDM_MACRO NAME=lsCol attr=string6>
    
    <PDM_MACRO NAME=lsCol attr=caused_by_chg.chg_ref_num>
    
    <PDM_MACRO NAME=lsCol label="Customer" attr=customer>
    <PDM_MACRO NAME=lsEnd isTicketFactory=1>
    </SCRIPT>
    Originally the Attribute in the lower section was set to just category, which is why when I used that in the top section I was getting the data from the tickets. This was not providing the desired look=up link however.

    Setting the both values to category.sym allowed us to get the both the value from the tickets and have the look-up functionality.


  • 3.  RE: Issues getting field look up working in List edit view

     
    Posted Mar 18, 2013 01:38 PM
    Thanks for letting everyone know the resolution Mark! :grin:


  • 4.  RE: Issues getting field look up working in List edit view

    Posted Jun 18, 2013 12:34 PM
    Thanks Mark... this set us on the correct path for adding fields to the list_cnt form (for anyone else who could use it or has a comment :smile ):


    [edit in list section]
    listEditField("dept", "Department");
    listEditField("admin_org","Organization");
    [list section]
    <PDM_MACRO name=lsCol hdr="Department" attr=dept>
    <PDM_MACRO name=lsCol hdr="Organization" attr=admin_org>

    looks and appears to work fine, but without a lookup and

    [edit in list section]
    listEditField("dept.name", "Department");
    listEditField("organization.name","Organization");
    [list section]
    <PDM_MACRO name=lsCol hdr="Department" attr=dept.name>
    <PDM_MACRO name=lsCol hdr="Organization" attr=organization.name>

    looks ok in list, is a lookup, and appears to work


    -fred


  • 5.  Re: RE: Issues getting field look up working in List edit view

    Posted Feb 25, 2016 08:05 AM

    I added the below code in list_grpmem.htmpl

    --------------------------------------------------

    <PDM_FORM NAME="frmFID">

    </PDM_FORM>

    <PDM_IF "${current:n/a}" != "n/a">

    <SCRIPT LANGUAGE="JavaScript">

    <pdm_jscript file=list_edit.js>

    startListEdit(__search_filter);

    listEditStartRow();

    listEditReadonly("member.combo_name","Name");

    listEditField("manager_flag","Manager Flag");

    listEditField("notify_flag","Notify Flag");

    listEditEndRow();

    endListEdit();

    ---------------------------------------------------

    I could not able to update Manager Flag and Notify Flag using Edit In List function.

     

    Please help on this.

     

    Thanks