Hello,
I am trying the Chart to List documentation but having trouble with it. I created a Dashboard site and added the list to the page as well. I believe I have all the configurations correctly however nothing is happening.
I am using the SharePoint Fields AssignedTo and Status
Here is my code:
var handlers = {};
handlers.preRender = function (config, logger) {
logger.debug('Configuration: ', config);
var filtrationApplied = false;
config.plotAreaClick = function (e) {
if (!filtrationApplied) {
window.location.hash = '';
}
filtrationApplied = false;
}
config.seriesClick = function (e) {
if (ctx && ctx.clvp) {
var filter =
'FilterField1=AssignedTo-FilterValue1=' + e.dataItem.AssignedTo
+ '-' + 'FilterField2=Status-FilterValue2=' + e.dataItem.Status;
window.location.hash = '{9F0A5D52-3E2B-4DB6-A294-863EB366E99D}' + ctx.clvp.wpid + '='+ encodeURIComponent(filter);
filtrationApplied = true;
}
}
return true;
}
On my task page the url is: _layouts/15/start.aspx#/Lists/at/AllItems.aspx#InplviewHashc4c6caef-f83b-4e15-acd7-1dc27b7053a8=CascDelWarnMessage%3D1-FilterField1%3DAssignedTo-FilterValue1%3DAlejandra%2520Garcia
On my dashboard page when try to look for view id it is: /DashBoard.aspx?View={9F0A5D52-3E2B-4DB6-A294-863EB366E99D}&FilterField1=AssignedTo&FilterValue1=Alejandra%20Garcia
I have tried both view ids but nothing seems to work. I don't see any errors in the developer tools. Please advise what I am doing wrong. As usual, I greatly appreciate your help.
Hello,
I noticed that this works on the first click, then it gives the error. I then have to refresh the page in order to click on another name in order to work. So it seems to not read the code after the first click.