Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by jonasborg

  1. What I did to accomplish this is to create a Incident Type field. The entry point is a button on a certain Incident Type will allow for other Incident Types to be created using a PRESET function, which will also set the parent field to the Incident which the button was clicked on. I then do if statements around the Incident Type. How I display them is to duplicate the in_relreq_tab.htmpl and put a whereclause on the list which identifies the Incident Type.
  2. What I do to accomplish this is with javascript. I pass a value from the menubar: upd_specific_frame('sd', 'SEARCH', 'FACTORY=in', 'QBE.EQ.zcustomfield=400010') It passes the value as list_in variable argSearchWhereClause On the list form, I declare 2 variables, one of which is a Regular Expression, the other takes the passed variable and tests for true or false. var pattern = new RegExp(/(The Expression)/); var truefalse = pattern.test(argSearchWhereClause); Then I do an if statement if(truefalse == true){ <PDM_MACRO name=lsStart> ... }
  3. So I was trying to get the Search menu item to default a search parm, and you've done it. You are awesome and excellent. I used this in the function that I created when I inserted a new item via Menu Designer. I set a label and then published. upd_specific_frame('sd', 'SEARCH', 'FACTORY=cr', 'QBE.EQ.zfield=400015') Makes sense given the PRESET is for new objects only. Thank you so much for your help.
  4. Wow, great thought! I hadn't considered that before. Tried out the following and still isn't setting zfield with the value. upd_specific_frame('sd','list_in.htmpl','QBE.EQ.zfield=400015') upd_specific_frame('sd','search_in.htmpl','QBE.EQ.zfield=400015') I have to step away from this for the day, hoping my subconscious will have a breakthrough.
  5. The difference in buttons vs menu is that with the buttons I am creating new records with a preset value, with the menu I am trying to search in context of that preset field on an Incident. The button code that works - presets the Parent value as well as the zfield value: CODE <PDM_MACRO name=button Caption="Create Type O Record[!eaO]" Func="create_new('cr',0,0,0, 'PRESET=type:I', 'PRESET=parent:$args.persistent_id', 'PRESET=zfield:400015','INITFROM=frm002');" hotkey_name="Create Incident[!eaO]" ID=ITIL_INCIDENT> The menu codes that don't preset a value: CODE upd_specific_frame('sd','search_in.htmpl','PRESET=additional_where=zfiled:400015') upd_specific_frame('sd','search_in.htmpl','PRESET=zfiled:400015') upd_specific_frame('sd','list_in.htmpl','PRESET=additional_where=zfiled:400015') upd_specific_frame('sd','list_in.htmpl','PRESET=zfiled:400015')
  6. Split presets work in button form, but am still struggling with PRESETs from a menubar as it relates to presetting a list_* form or a detail_* form value.
  7. I have a similar requirement and have been unable to have an IF statement around the Additional Search Arguments that I pass from the Search menu preset. Does anyone have a suggestion?
  8. In 14.1, I am trying to PRESET a value. This sets the value: http://my_server/CAisd/pdmweb.exe?OP=CREAT...T=zfield:400010 But when I put it into the menubar it doesn't work: ahdtop.create_new('cr',0,'','','PRESET=type:I@@zfield:400010') Thanks for any help on how this would work.
  9. I would like to use list_in to display only one type at a time. Is there a way to conditionally display lsCol's on the list_in form based on a current attribute? I have Incident attribute type for Type 1 and Type 2. Could someone nudge me in the right direction?
  10. Thanks Mitu, we have an LREL in another environment, but the screen to add to it looks like the Update Members in a group. We will base the tab on the CI tab in change. This might be the piece that gets us over the roadbump. Thanks again for the suggestion (glad it's not SPEL), I will perform the work and report back.
  11. Greetings. I have a requirement and am unsure how to approach it. On an Incident, the customer wants to have a "root causes" input. However, this root causes input must present it's own input screen and ultimately be able to have a list form as a tab to show each time this screen is filled in and saved (can be multiple root causes - which we have challenged and they do have a business reason). If someone could point me in the right direction, it would be immensely helpful. Any insight is appreciated. Unfortunately the search terms I have used looking for information haven't yielded any actionable results. Should function similarly to Activities>Solution in Problem (could be create new button as well), without any relation to KD, except ideally would be able to edit/remove the entries. Alternately, after some discussion, it might work if we could allow editing/deletion of Solution records. We could repurpose that tab. But that tab just seems so tied to KDs not sure if it's worth it.
  12. Thanks Mitu. Had to close the quotes on args.category.sym, but it works. Not really sure what I was missing before, as I thought I had tried this format. <PDM_IF "$args.category.sym" == "MY_CATEGORY_NAME"> var hdrTitle = "$args.ref_num IF Detail"; <PDM_ELSE> var hdrTitle = "$args.ref_num ELSE Detail"; </PDM_IF>
  13. I would like to change the detail_in hdrTitle depending on the Category value. I realize on new you will need to display something, but can you leverage the category to conditionally change the hdrTitle value? I see it (if statement on hdrTitle) has been done in list_cnt but cannot seem to make it happen on detail_in using args.category. Thanks for any insight.
  14. Flawless execution. This is fantastic stuff. I really appreciate the assist here. This is huge for us.
  15. I am looking to create an activity entry on a Request, with a custom type by clicking on a button. No attributes on the form should change, but a log entry should be written. This will result in a PAM flow execution as an action on true. Advice on this forum steered me away from embedding the function in the button. What I did was copy the request_update_status.html, and called it with the button. However, none of the arguments come over (ref_num, type). How do I bring those arguments over in context of the ticket I am clicking the button on? Finally, I wish for this form to autosave so it writes the activity without further intervention. I have tried to embed a pdm_submit function with a window.timeout of 500, but it still gives me a Page Load in Progress error. Any guidance would be appreciated. Here is how I am calling the custom htmpl form: ImgBtnCreate("btncus", "Custom", "popup_window('','custom_activity.htmpl')", true, 0, "Select this button"); I also added some hidden inputs on detail_cr that relate to the values I want, but it doesn't give me any more data. webengine didn't understand when I tried to pass a 'INITFROM=custom' as defined as the form name starting the hidden inputs section.
  16. cdtj, In further testing, this does not appear to work. Choosing Inactive still displays Open cases. I wonder why the heck CA used the following syntax and if there is a way to adapt it or add a default value to it: searchFilterDropdown("Active","active","","noempty","< empty >","(active = 0 OR active = 1)","<selected>","Active","1","Inactive","0");
  17. I am attempting to define an IF statement on the menubar to only show the option if the Change Order is in a particular status. The challenge, to me, is that it doesn't appear this menubar sees the context of the Change Order so even using $args.chg.status== doesn't affect the field. Not sure where to go from here. Any suggestions? Thanks!
  18. I have been unable to force the Active flag to be empty by default. Does anyone have a suggestion as to how this might be accomplished? Original searchFilterDropdown("Active","active","","noempty","< empty >","(active = 0 OR active = 1)","Active","1","Inactive","0"); This defaults to active Tried the following <PDM_MACRO name=sfDropdown hdr="Active" attr="active_flag.sym" factory=actbool> This does not show a dropdown, but a lookup
  19. You are exactly right. I have even used that before. Thanks, sometimes a reminder is needed. By the way, this did work out.
  20. I am working to trigger some spel code only when a non-saved ticket is saved in Resolved or Closed. I have created the PRE_VALIDATE trigger to use group_prev and have tried status_prev. Each of those has issue enough to make them unworkable since they still trigger for some tickets that have already been saved. It would be good if there was something reliable like the if("$args.id" == 0) I use on some htmpl page. Does anyone have suggestions whether for the MOD or SPL that would accomplish this?
  21. If the change type is "pre-approved" or the change type is "Normal" OR the change category is "New" then we need to set a custom field value, else we need to set it to a different value. I have tried this in SPEL but thought maybe javascript would be more appropriate. The issue is I do not have the javascript experience to do this. Any suggestions?
  22. Looking at this (from list_KD,js), it appears that I might be able to alter the additional where clause which will then apply to all knowledge searches in the form group this script file exists, but I cannot figure out the syntax to use. The requirement from my client is to limit the search results for a role to only show documents which do not have "Template1" as the document template. Any help is greatly appreciated. var catType = getEbrCategoryFilterType(); if (catType == "current") { var categoryPath = ahdframe.parent.getCurrentRelationalPath(); addl_where = "(DOC_LINKS.RELATIONAL_ID='" + categoryPath + "' OR DOC_LINKS.RELATIONAL_ID LIKE '" + categoryPath + "-%')"; var results = url.match(/ADDITIONAL_WHERE=([^+&]*)/); if (results == null) { url += "+ADDITIONAL_WHERE=(" + nx_escape(addl_where) + ")"; } else { var curr_addl_where = results[1]; var pos = url.indexOf(curr_addl_where); var new_addl_where = curr_addl_where + " AND (" + nx_escape(addl_where) + ")"; url = url.substring(0, pos) + new_addl_where + url.substring(pos+curr_addl_where.length); } url += "+KEEP.cat_filter_type=current"; } else { if (allCatClause.length > 0) { var results = url.match(/ADDITIONAL_WHERE=([^+&]*)/); if (results == null) { url += "+ADDITIONAL_WHERE=(" + nx_escape(allCatClause) + ")"; } else { var curr_addl_where = results[1]; var pos = url.indexOf(curr_addl_where); var new_addl_where = curr_addl_where + "%20AND%20(" + nx_escape(allCatClause) + ")"; url = url.substring(0, pos) + new_addl_where + url.substring(pos+curr_addl_where.length); } } url += "+KEEP.cat_filter_type=all"; } url += "+SEARCH_FILTER=1"; return url; }
  23. We have a requirement for a dropdown on detail_in which displays the groups the logged in user is a member of. I am running into my own confusion. Has anyone else successfully done this or is there someone who can offer insight into this? I think the where clause would be something like WHERE="member=U'$cst.id'" on Factory=grpmem, but have not formulated a workable solution thus far.
  • Create New...