CA Service Management

 View Only
  • 1.  Preset value on list_in from menubar

    Posted Oct 01, 2015 04:40 PM

    I have a requirement to conditionally display search fields and lscol fields on the list_in form based on a preset in the Search menu.  I have a custom field that is a sfdropdown and I have been unable to successfully preset that value from the menubar_sd_l2_analyst. 

     

    Here is what I initially thought would work, but I have tried many variations with no success. I would be OK using a where_clause as well but that field doesn't seem to exist on the form as a search field.

     

    upd_specific_frame('sd','search_in.htmpl','PRESET=zcustomfield:400010')

     

    Any suggestions?

     

    Thanks in advance.



  • 2.  Re: Preset value on list_in from menubar
    Best Answer

    Posted Oct 02, 2015 01:24 PM

    Hi Nate, your inquiry about conditionally displaying search fields would require custom code to meet your requirement.  This type of customization is something that would need to be addressed by our CA Services Teams.  Services can be contacted via http://www.ca.com/us/services.aspx?intcmp=headernav  You can also find additional information about CA's Services capabilities on this page as well.

    Thanks,

    Jon I.



  • 3.  Re: Preset value on list_in from menubar

    Posted Oct 05, 2015 08:14 AM

    I appreciate the heads up that this is custom code. With this, it's a risk we are willing to take. We spend a lot with CA and are not approved to spend any on CA Services so I'm looking for some guidance from the community on how to address this requirement. 



  • 4.  Re: Preset value on list_in from menubar

    Posted Oct 05, 2015 05:04 PM

    Hi Nate,

     

    I was poking around trying to accomplish this and there appears to be javascript in std_head.js that accompanies the code on the menubar.  Take a look there and see if you can make sense of it.  I'm not an experienced developer so this is beyond me.

     

    It looks like this is the piece of code in std_head.js used for auto filling the contact type when you select search Groups.

     

    else if ( obj_type == "grp" )

    {

    extra += "+KEEP.type.id=2308";

    extra += "+QBE.EQ.delete_flag=0";

    }

     

    This is the macro for group search on the menubar.

    <PDM_MACRO name=menuItem label="Groups" function="upd_specific_frame('sd','search_cnt.htmpl', 'KEEP.type.id=2308')">



  • 5.  Re: Preset value on list_in from menubar

    Posted Oct 06, 2015 02:02 PM

    Some more info I have found.

     

    The out of the box function is upd_specific_frame('sd','search_in.htmpl')

     

    search_in.htmpl only exists in bopcfg\www\htmpl\pda.  If I copy that file and create a new function in Menu Designer, utilizing the same code as search_in.htmpl with a different name, it shows the PDA interface.  If I replace the code with the list_in form, it does not render but if I call list_in from the search menu it works but still cannot set a PRESET yet. Have tried a custom list_in2.htmpl form with it added to resultset.js and std_list.js.

     

    If I remove the bopcfg\www\htmpl\pda folder, the out of the box Search>Incidents still works just fine even after pdm_webcache and clearing cookies.

     

    Will continue down this road and will find a viable solution.



  • 6.  Re: Preset value on list_in from menubar

    Posted Oct 07, 2015 02:48 PM

    Turns out a PRESET cannot be used because it is for new objects only.

     

    The function had to be manipulated (I had been trying to duplicate the Search>Incidents function). I was able to add it via WSP using Menu Designer (just insert and add the caption and function where relevant). It is not a significant customization.

     

    Here is the function used:

    upd_specific_frame('sd', 'SEARCH', 'FACTORY=cr', 'QBE.EQ.zcustomfield=400015')



  • 7.  Re: Preset value on list_in from menubar

    Posted Oct 07, 2015 02:56 PM

    If you accomplished this outside of the source view then it would not have required CA Services and is something CA Support could have helped with.  Support has told me before, anything from the GUI is supported by them, but manually changing the source from the source tab is not.  Someone should change the correct answer in this discussion.



  • 8.  Re: Preset value on list_in from menubar

    Posted Oct 07, 2015 03:39 PM

    fyi, QBE is very useful to make external links if you want to share something with others, and EQ isn't only operator, all QBE operators described here:

    https://wiki.ca.com/display/CASM1401/Control+Properties#ControlProperties-QBECondition

    For example "zcustomfield>0 AND zcustomfield<10" condition will look:

    js:

    upd_specific_frame('sd', 'SEARCH', 'FACTORY=cr', 'QBE.GT.zcustomfield=0', 'QBE.LT.zcustomfield=10');

    or url:

    pdmweb.exe?OP=SEARCH+FACTORY=cr+QBE.GT.zustomfield=0+QBE.LT.zcustomfield=10