Filtering with URL-parameters

Hi,

is there a way to filter the chart depending on url-parameters? Let´s say i have an accountname in my url and i want to show the chart for this person by opening the page.

I´m deploying the org chart with visual studio (org chart webpart as xml) and would be glad to add all necessary information to get my customized chart after deploying.

Hi,

Thank you for your questions.

Currently it is not possible to navigate to specific person in Org Chart according to URL parameter.

We have various requests about this functionality and most likely we will implement in future. Unfortunately I can’t provide you any due date for now.

Hi,

thanks for your quick response. I´d also like to know, if it´s possible to deploy the org chart with visual studio to an aspx-page? As i mentioned in my last post, i deployed the org-chart-webpart via xml to my page, but i still have to do the whole configuration by using the webpart´s wizard.
Are there any properties i can set, that allow me to use the org chart straight after deploying it without executing the wizard?

Hi,

Current version of Org Chart stores configuration in property bag of current site. You can create it programmatically from your Visual Studio solution, for example on feature activation.

Hi Anton,

could you provide some Details concerning the PropertyBag? I seem not to be able to find it on the site itself.

Thanks

Hi,

You can access site property bag using SharePoint Designer. Just open site and click ‘Site options’ in the ribbon.

You also can access property bag using API. SPWeb has AllProperties property. It is a property bag.

Please note that version 2.0 and higher doesn’t use property bag to store settings anymore. It stores settings right in the web part in the PartStorage property.

[quote]Currently it is not possible to navigate to specific person in Org Chart according to URL parameter.

We have various requests about this functionality and most likely we will implement in future. Unfortunately I can’t provide you any due date for now.[/quote]

Is this possible in the new Version of the OrgChart?

Hi,

Yes, it is possible now using JavaScript framework. There is a function:

renderer.drillDown(ID)

Where ID is an ID of employee. If you use user profiles as a data source it is account name.

So, you can get value of parameter and drill down to specific person.

You can find more information about framework in the documentation.

If you want to do it automatically on page load the script will look like below. I use “accountname” as parameter from URL string.

var isFirstLoad = true;

function getParameterByName(name) {
    name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
    var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
        results = regex.exec(location.search);
    return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}

renderer.onLoadingFinished(function(){
  
  if(isFirstLoad){
  
    isFirstLoad = false;
    
    var accountName = getParameterByName("accountname");
  	renderer.drillDown(accountName);
  }  
  
});