Blog Post created by TMACUL Champion on Jan 1, 2016


This article provides instructions for adding Contact Searching capabilities to the Employee/Customer Interface.


Step 1. Remove Data Partition Constraints

By default the Employee and Customer Access Types have Data Partitions associated with them. Delete or Inactivate the VIEW constraint on the ca_contact table.

Step 2. Add lookup field to forms

Add a dtlLookup PDM_MACRO to the desired detail form (detail_chg.htmpl, detail_cr.htmpl, detail_iss.htmpl). When the label of this field is selected the list_cnt.htmpl form is launched. Example:

<PDM_MACRO NAME=dtlLookup hdr="My Field" attr="zyourfield"> 

Step 3. Create list_cnt.htmpl Form

The list_cnt.htmpl will display the list of contacts from which to make a selection.

Click Here to download file, or copy syntax below.

<html lang="en"><HEAD>


<PDM_INCLUDE FILE="std_head.htmpl">

<pdm_set PRE.Is3FieldContact=1>


var argBackfillField = '$args.KEEP.backfill_field';

var argBackfillForm = '$args.KEEP.backfill_form';

var argBackfillAttr = '$args.KEEP.backfill_attr';


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

searchFilterInitialState = "show";


var cfgCurrent = '$current';

var cfgTotal = '$total';

var cfgRecordCount = '$record_count';

var cfgStart = '$start';

var cfgLength = '$length';


var cfgIsPopup = '$args.KEEP.IsPopUp';

var rptName = new Array("no", "no");

var cfgCanEdit = true;


<PDM_INCLUDE FILE=std_list_include.htmpl>

<SCRIPT LANGUAGE="JavaScript" SRC="$CAisd/scripts/sitemods.js"></SCRIPT>


<BODY CLASS="list">

<PDM_INCLUDE FILE=std_body.htmpl>



<pdm_macro name=sfStart factory=cnt>


<pdm_macro name=sfStartRow>

<pdm_macro name=sfTextbox hdr="Last Name" attr=last_name size=20>

<pdm_macro name=sfTextbox hdr="First Name" attr=first_name size=20>

<pdm_macro name=sfTextbox hdr="Middle Name" attr=middle_name size=20>


<pdm_macro name=sfStartRow>

<pdm_macro name=sfDropdown hdr="Active" attr=delete_flag>

<pdm_macro name=sfTextbox hdr="Contact ID" attr=contact_num size=20>

<pdm_macro name=sfTextbox hdr="Phone Number" attr=phone_number size=20>


<pdm_macro name=sfEnd>




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


var msgFoundNone = "No contacts found";

var msgFound1 = "1 contact found";

var msgFound = "%1 contcts found";

var msgFoundMore = "%1 contacts found. Displaying %2 through %3";

var msgSelect = "Click to select desired contact";


<pdm_macro name=lsStart>

<pdm_macro name=lsCol hdr="Name" attr=combo_name link=yes>

<pdm_macro name=lsCol hdr="Phone Number" attr=phone_number>

<pdm_macro name=lsCol hdr="Location">

<pdm_macro name=lsCol hdr="Organization">

<pdm_macro name=lsCol hdr="Status" attr=delete_flag>

<pdm_macro name=lsEnd>



<BASE TARGET="_top">

<PDM_INCLUDE FILE="std_footer.htmpl">



Step 4. Clear the web cache

The final step is to clear Service Desk's cache. Publish your changes via the Web Screen Painter. The process of publishing automatically initiates a pdm_webcache.