How to configure parent child dashboard? - Printable Version +- Forums (https://bdn.bdb.ai) +-- Forum: BDB Knowledge Base (https://bdn.bdb.ai/forumdisplay.php?fid=13) +--- Forum: BDB Dashboards Designer (https://bdn.bdb.ai/forumdisplay.php?fid=43) +---- Forum: BDB Designer Q & A (https://bdn.bdb.ai/forumdisplay.php?fid=16) +---- Thread: How to configure parent child dashboard? (/showthread.php?tid=553) |
How to configure parent child dashboard? - jeevitha - 12-23-2022 -> In the parent dashboard: sdk.setContext('parm', changedItem.attributes._id ); var customer =sdk.getContext( 'parm' ); //alert(customer); var a=sdk.getContext('dashboard_user').apiToken; var b=window.location.origin; var c="/home/#/opendocument?docid=544669703&doctype=2&token="; var v3=b+c+a+ '&id=' +customer; //alert(v3); window.open(v3,'_blank') Fetch the data in child dashboard var v3=parent.window.location.href; //alert(v3); function getParam( name, url ) { if (!url) url = location.href; name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); var regexS = "[\\?&]"+name+"=([^&#]*)"; var regex = new RegExp( regexS ); var results = regex.exec( url ); return results == null ? null : results[1]; } var ap=getParam('id',v3); //alert(ap); sdk.setContext('pass', ap); |