cancel
Showing results for 
Search instead for 
Did you mean: 

Search user by Comapny Name

paszczakus91
Champ in-the-making
Champ in-the-making
Hi,

I have small question, how can i search users by company name?
7 REPLIES 7

mikeh
Star Contributor
Star Contributor
You don't say which version or whether this is an API or UI query, but if you're using Share on 4.x then go to the people-finder page (click People at the top) and check through the help there.

Spoiler: "organization:alfresco" for example

Thanks,
Mike

paszczakus91
Champ in-the-making
Champ in-the-making
Hi,
Thanks, it's working
but i have one more question, how can i create some button to automatic search by for example organization or jobtitle

mikeh
Star Contributor
Star Contributor
Can you be a bit more specific?

Thanks,
Mike

paszczakus91
Champ in-the-making
Champ in-the-making
Ok, sorry

I have Alfresco 4.2b and I wont to create some button or form to automatic search people (search people only by click on button, no write in people search ex. location:Amsterdam, only click button "Amsterdam" to show people from Amsterdam Location

mikeh
Star Contributor
Star Contributor
Sounds like you just need to create the button (pure JavaScript or HTML via the Freemarker template and then attach YUI to it) and have it auto-populate the field and submit the form. I would re-use the existing form & code rather than create a completely parallel implementation.

Have a look through Dave Draper's and Erik Winlof's blogs to get started with Share customisation techniques.

Thanks,
Mike

paszczakus91
Champ in-the-making
Champ in-the-making
Thanks for reply.
On that blogs are lot of information, but i can not find information about new button.
But i find that https://forums.alfresco.com/en/viewtopic.php?f=12&t=27835
I create button in people-finder.get.html.ftl file but where can I implement it or where can i find implementation of original Search button

paszczakus91
Champ in-the-making
Champ in-the-making
Ok, I was created the button, it must implemented in people-search.js ans people-search-min.js, it is searching all users but how can i change  that function to search only users from example organization:Micro
onSearchClick1: function PeopleFinder_onSearchClick(e, p_obj)
       {
           var searchTerm1 = Dom.get(this.id + "-search-text").value;
           if (searchTerm1.replace(/\*/g, "").length < this.options.minSearchTerm1Length)
           {
               Alfresco.util.PopupManager.displayMessage(
               {
                   text: this.msg("message.minimum-length", this.options.minSearchTerm1Length)
               });
               return;
           }
        
           this.userSelectButtons = {};
           this._performSearch(searchTerm1);
       },