ALERT! The community will be read-only on April 19, 8am Pacific as the migration begins. Read more for important details.
ALERT! The community will be read-only on April 19, 8am Pacific as the migration begins.Read more for important details.
Commander Commander
Commander
170 views

Search Contacts Phone over multiple phone fields

Jump to solution

Hi

I need to search contacts by phone over all phones fields. For example on contacts search form I insert portable.phone and in search result i need all contacts where portable.phone, car.phone, contact.phone or any other phone field equals portable.phone. Is it achievable?

SM ver. 9.64

Regards,
Ainer

0 Likes
1 Solution

Accepted Solutions
Vice Admiral
Vice Admiral

From my understanding, you want the user to have the capability to search a phone number and display a list of contacts who have the same number displayed in any phone field.

To accomplish your goal, you will indeed need a variable to be used as a temporary field to identify a phone number.
You will need to modify the "advFind.search.contacts" in format designer. Create a copy for backup purposes.
For testing purposes, add a text box to the form.
For the text box input, type $phone.number. The temporary variable $phone.number will be used to capture the data to look for in your query.
Add a label next to text box and display caption as "Phone Number"
Save form.


Follow the same steps from my previous post, but with a minor modification to query.
You will need to be on a browser to complete steps. Within the Object table, search for contacts.
Click on the "Search Configuration" tab and then click on the "Modify Configuration" link.
On the "Defined Queries" tab, add your search criteria query. ID would be something to quickly identify variable, example "Phone Number Variable".
Query would be $phone.number isin {car.phone, contact.phone, home.phone, portable.phone}.
Description would be your description of the search criteria, example; "Phone Number Search".

The end result would be a user entering a phone number to display the variable data, select "Phone Number Search" to true, and then clicking search to display contacts containing the phone number displayed in any phone field.

You will need to modify your contact search form to display in a clean way for the phone number search and "Phone Number Search" box. I moved the dynamic form to the right side and added the phone number box above the dynamic form and also added a wrapped text box above the phone number box to display instructions on the optional search.

 

Joe

View solution in original post

6 Replies
Vice Admiral
Vice Admiral

With SM, anything is possible 😁

From the contact search, you can conduct an advance search from the More option and type:

portable.phone isin {car.phone, contact.phone, home.phone}

 

Click search to get your results of contacts who have their portable phone number the same as other phone fields within there contact form.

 

Joe

 

0 Likes
Commander Commander
Commander

Yes i know that solution, but this is more like for "advanced" users, because you have to know all the field names, query syntax etc 🙂 We need more easier solution every user can manage and that was customer wish to make simple search work like this.

Regards,
Ainer

0 Likes
Vice Admiral
Vice Admiral

The easy button way for users would be to modify the contacts Object table and add a defined query, which would display on the contact search form. You will need to be on a browser to complete steps. Within the Object table, search for contacts. Click on the "Search Configuration" tab and then click on the "Modify Configuration" link. On the "Defined Queries" tab, add your search criteria query. ID would be something to quickly identify field, example "Portable Phone". Query would be portable.phone isin {car.phone, contact.phone, home.phone}. Description would be your description of the search criteria, example; "Portable Phone same in other phone fields".

If needed, you can also add additional defined queries for same type of search.

Examples

car.phone isin {poratble.phone, contact.phone, home.phone}

contact.phone isin {car.phone, portable.phone, home.phone}

home.phone isin {car.phone, contact.phone, portable.phone}.

On the contacts form, you will see a check box for the defined criteria. Checking the box and clicking search will give you the results.

 

Joe

Commander Commander
Commander

I've been trying that also but i couln't see how to make it work. I quess my problem description was little bit wrong.
Here is example what i meant. Lets have a contact with data:
name: Ainer
portable.phone: 123
contact.phone: 456

In contacts search form i fill portable.phone = 123 and after searching i have a result with contact name Ainer.  When i fill portable.phone = 456, i'd like to get also a result with contact name Ainer. So it means the search query must look like:
1 - portable.phone = "123" or contact.phone="123" 
2 -  portable.phone = "456" or contact.phone="456" 

Is there a way i could have a global variable on search form and then use it in defined query?

Regards,
Ainer

0 Likes
Vice Admiral
Vice Admiral

From my understanding, you want the user to have the capability to search a phone number and display a list of contacts who have the same number displayed in any phone field.

To accomplish your goal, you will indeed need a variable to be used as a temporary field to identify a phone number.
You will need to modify the "advFind.search.contacts" in format designer. Create a copy for backup purposes.
For testing purposes, add a text box to the form.
For the text box input, type $phone.number. The temporary variable $phone.number will be used to capture the data to look for in your query.
Add a label next to text box and display caption as "Phone Number"
Save form.


Follow the same steps from my previous post, but with a minor modification to query.
You will need to be on a browser to complete steps. Within the Object table, search for contacts.
Click on the "Search Configuration" tab and then click on the "Modify Configuration" link.
On the "Defined Queries" tab, add your search criteria query. ID would be something to quickly identify variable, example "Phone Number Variable".
Query would be $phone.number isin {car.phone, contact.phone, home.phone, portable.phone}.
Description would be your description of the search criteria, example; "Phone Number Search".

The end result would be a user entering a phone number to display the variable data, select "Phone Number Search" to true, and then clicking search to display contacts containing the phone number displayed in any phone field.

You will need to modify your contact search form to display in a clean way for the phone number search and "Phone Number Search" box. I moved the dynamic form to the right side and added the phone number box above the dynamic form and also added a wrapped text box above the phone number box to display instructions on the optional search.

 

Joe

View solution in original post

Commander Commander
Commander

Thank you, got it work now. I tried the same logic before but was missing something i guess.

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.