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.
Thanks in advance.
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.
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.
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')">
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.
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')
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:
For example "zcustomfield>0 AND zcustomfield<10" condition will look:
upd_specific_frame('sd', 'SEARCH', 'FACTORY=cr', 'QBE.GT.zcustomfield=0', 'QBE.LT.zcustomfield=10');
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.