Alter custom Active Form to allow Drillthrough

activeform
drillthrough

#1

Hi,

we have a custom Active Form in our Page, that has to be altered in order to support (the newly added) drillthrough from its cells.
Has anyone been in a similar situation? What is the best way to edit our ActiveForm?

This is the Row part of our custom Active Form:

<tr ng-repeat="rowData in data.rows track by $index" ng-if="(page.kpiFilter.length == 0 || rowData['IR Measure'].key.toUpperCase().indexOf(page.kpiFilter.toUpperCase()) >= 0) &&rowData.inPage" >
	<td
		tm1-ui-rpt-row-element="rowData"
		tm1-dimension="IR Measure">
	</td>
	<td>
		<tm1-ui-dbra
				tm1-instance="dev"
				tm1-dimension="IR Measure"
				tm1-element="{{rowData['IR Measure'].key}}"
				tm1-attribute="Beschreibung"
				tm1-read-only="true"
				tm1-hide-reference="true"
				tm1-hide-comment="true"
				tm1-hide-spread="true"
				tm1-hide-drill="true">
		</tm1-ui-dbra>
	</td>
	<td class="text-right">
		{{rowData.getCell(page.years[0]).value | formatNumber:2}}
	</td>
	<td class="text-right">
		{{rowData.getCell(page.years[1]).value | formatNumber:2}}
	</td>
	<td class="text-right">
		{{rowData.getCell(page.years[2]).value | formatNumber:2}}
	</td>
	<td class="text-right">
		{{rowData.getCell(page.years[3]).value | formatNumber:2}}
	</td>
	<td class="text-right">
		{{rowData.getCell(page.years[4]).value | formatNumber:2}}
	</td>
	<td class="text-right">
		{{rowData.getCell(page.years[5]).value | formatNumber:2}}
	</td>
</tr>

Cheers,

Marius


#2

Hi @mwirtz,

You can still use the other version of the DBR tied to the active form like:

<tm1-ui-dbr tm1-rpt-view-model="data" tm1-rpt-row-cell="rowData.getCell('<column elements here>')"></tm1-ui-dbr>

That way, you have all the other options available on the DBR.

You can use the page creator for the active form by setting up your cube view and checking the following option to give you a page to start with:


Paul


#3

@plim

Hello, I’m working with Marius on this,

we did the change as you suggested:

<tm1-ui-dbr tm1-instance="dev" tm1-rpt-view-model="data" tm1-rpt-row-cell="rowData.getCell(page.years[1])"></tm1-ui-dbr> 

But we get the error:

TypeError: Cannot read property ‘instance’ of undefined

The JavaScript part where this happens is:
n.tm1Instance=n.tm1RptViewModel.instance

It seems the rpt view model is not available in the context.

I just checked, the tm1-ui-dbr is embedded inside a tm1-ui-rpt-view element.


#4

Hi @Roland,

The example posted did not include tm1-instance.

Try to remove that.

Let us know how it goes.


Paul


#5

Hi @plim

I removed it, I get the exact same error as before, at the same place in the JavaScript. So it is not related to the tm1-instance.


#6

Hi @Roland,

Try it out via the Page Creator for the active form.

Let us know how it goes.


Paul


#7

Hi @plim

I checked the code created by Page Creator and solved the problem it by nesting inside a <td> element:

<td class="text-right">
    <tm1-ui-dbr
        tm1-rpt-view-model="data"
        tm1-rpt-row-cell="rowData.getCell(page.years[0])">
    </tm1-ui-dbr>
</td>