Re: Can't find a way to search contacts as Expert Search functionality removed. (329 Views)
Reply
Occasional Visitor
pommie78
Posts: 3
Registered: ‎09-19-2013
Message 1 of 6 (360 Views)

Can't find a way to search contacts as Expert Search functionality removed.

I have sys admin rights but recently expert search was removed due to a risk issue.

 

Out of the 100,000+ contacts, it was easy to use expert search to find any number of contacts as I know their user.id.

 

Now I have no idea how to get back the 1000 contacts I need to mass update. I know who they are but I can't do it manually.

 

Is there a way to use the advanced filter? I couldn't work it out so as a last resort, thought I would ask some experts.

 

Any ideas?

 

Thanks,

Please use plain text.
Honored Contributor
Vadim Gorda
Posts: 5,667
Registered: ‎11-10-2008
Message 2 of 6 (357 Views)

Re: Can't find a way to search contacts as Expert Search functionality removed.

You can write short sl to update the required records if you have exact  parametrs based on which you can query that exact contacts.

Please use plain text.
Occasional Visitor
pommie78
Posts: 3
Registered: ‎09-19-2013
Message 3 of 6 (344 Views)

Re: Can't find a way to search contacts as Expert Search functionality removed.

Hi Vadim.

 

Thanks for your response.

 

I know the fields I need to update and the values they need to be and I know all of the users/contacts via their user.id but I wouldn't know about writing a short sl.

 

I would have thought there be an easy way to be able to enter the criteria similar to advanced search somewhere is within Service Manager.

 

Expert Search was the most useful feature for me for finding a whole load of contacts from their user.id.

 

 

Please use plain text.
Advisor
AlexRussell
Posts: 11
Registered: ‎10-31-2011
Message 4 of 6 (329 Views)

Re: Can't find a way to search contacts as Expert Search functionality removed.

Here is a sample javascript to search and update contacts

 

function UpdateContacts()
{
// this line creates a new file object pointing to the contacts table
var contacts=new SCFile("contacts");

// this is the query we will use to search. It uses the exact same rules as an export search. 
// Use \" to embed a double-quote in the query
var query="contact.name = \"alrussel\"";

	// do the query
	if ( contacts.doSelect(query) == RC_SUCCESS )
		{
		// loop through each of the records it finds
		do
			{
			print("Updating: " + contacts.contact_name);
			// change / update the data here. 
			//Field names with dots have the dots replaced with underscores 
			//because a dot is a js reserved word
			contacts.beeper_phone="New pager number";
			contacts.doUpdate();  // update this record
			}
		while ( contacts.getNext() == RC_SUCCESS );  // see if there are more records matching this query
		}
}

// actually call the function and have it do the updates
UpdateContacts();

 

 

 

Please use plain text.
Frequent Advisor
mpatrikov
Posts: 36
Registered: ‎09-11-2013
Message 5 of 6 (316 Views)

Re: Can't find a way to search contacts as Expert Search functionality removed.

Hi,

 

What Alex suggested above should work just fine.

 

If you have not deleted the DO Expert Search then you should be able to access it via the DB when you open the "contacts" table.

 

Best Regards,

Miro

Please use plain text.
Occasional Visitor
pommie78
Posts: 3
Registered: ‎09-19-2013
Message 6 of 6 (305 Views)

Re: Can't find a way to search contacts as Expert Search functionality removed.

Hi Alex.


Thanks a lot for this. Fortunately I managed to find out that a generic account still had the permissions to do expert search and was able to do what I needed to.

 

The option for expert search is still there but it brings back no results without it even going to the expert search screen.

 

As I'm not classically trained in SM9, I thought it best not to mess too much.

 

Thanks for everyones help.

 

 

Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation