sectionOCEPairInfos()

An array of Interactive Reporting database connection mappings is provided for the DOM.

Note:

These arrays are not the published Interactive Reporting database connection files associated with the document. However, you can associate the array of mappings with each query published Interactive Reporting database connection, and enable the document to access a data source defined in EPM Workspace.

Example using sectionOCEPairInfos():

oceMap = domSrc.sectionOCEPairInfos(uuiParentFolder)

Parameter

Description

uuiParentFolder

The folder UUID where the document is published

Example 1: Copying the Interactive Reporting database connection mappings from one DOM to another, and republishing the DOM as a new publication or a new version.

function copyBqy(in_repSrc, in_bqySrc, in_bqyTrg){
   var uuiFold = in_repTrg.getFolderUuid(in_bqyTrg.strFolder)
   var oceMapO = in_bqySrc.vrs.getSectionOCEMapping();
   var oceMapN = in_bqySrc.dom.sectionOCEPairInfos(uuiFold);
   for (var a = 0; a < oceMapO.length; a++) {
      if (oceMapO[a].isOCEEnabled()) {
         oceMapN[a].setOCEDocument(oceMapO[a].getOCEDocument());
         oceMapN[a].setOCEEnabled(true);
      }
   }
   var strD = "created by copyBqy"
   var blnD =in_bqyTrg.dom.isDashboard()
   var strH = in_bqyTrg.dom.getInitialTCSection()
   var uuiFound = hysl_getUuid(uuiFolder, in_bqyTrg.strName)
   var filBqy = in_bqyTrg.file
   var strN = in_bqyTrg.strName
   if (uuiFound != null){
      in_repSrc.addVersion(in_uuiToAdd, in_filBqy, in_strDesc)
   }else{
      in_repSrc.publishBqy(filBqy, strN, strD, uuiFold, blnD , strH, oceMapN);
    }    
}

Example 2: Publishing a new document and assigning a specific Interactive Reporting database connection to the queries of the new document.

var uuiFold = rep.getFolderUuid("/sales/monthly")
var oceMap = bqySrc.dom.sectionOCEPairInfos(uuiFold);
var uuiOCE = rep.getFileUuid("/OCE/salesInfo.oce")
for (var a = 0; a < oceMap.length; a++) {
    if (oceMap[a].isOCEEnabled()){
        oceMap[a].setOCEDocument(uuiOCE);
    }
}
var strD = "my description"
var blnD =bqySrc.dom.isDashboard()
var strH = bqySrc.dom.getInitialTCSection()
var filBqy = bqySrc.file
var strN = bqySrc.strName
in_repSrc.publishBqy(filBqy, strN, strD, uuiFold, blnD , strH, oceMap);