DBR with comma in element name


#1

Hi

How do I deal with element name that has a comma when using DBR or other directions in Canvas?

I have tried storing the element name as a variable in the js file and directly in HTML and both have failed.

The element name is UE01 - Finished Goods, Consumables & Funeral Disbursements. Unfortunately this is the actually element name and not an alias.


#2

Hi @Sb5,

You use double quotes around the element name.


#3

Hi Tim

It didn’t work. Canvas is still splitting the element name at the comma.


#4

Hi Ben,

Can you please provide the code you are using.


#5

Hi @Sb5,

Had just tried it out by inserting an element into the samples dimension, and this is how it should look like:

<tm1-ui-dbr tm1-instance="dev" tm1-cube="System Info" tm1-elements='"UE01 - Finished Goods, Consumables & Funeral Disbursements", String'></tm1-ui-dbr>


Paul


#6

Hi Tim

Below is the code I’m using:

COGS I'm getting the error below (as you will see, the element is broken up into element 6 and 7):

Header:
22
:
{id: “9ea89bbb-d1e4-c9fd-d954-557653b3e8fe”, instance: “dev”, cube: “General Ledger”,…}
cube
:
"General Ledger"
cubeElements
:
[“Forecast”, “AUD”, “2017.10”, “Total LOB-Brand”, “Total Company”, “Sydney & ACT Region”,…]
0
:
"Forecast"
1
:
"AUD"
2
:
"2017.10"
3
:
"Total LOB-Brand"
4
:
"Total Company"
5
:
“Sydney & ACT Region"
6
:
”"UE01 - Finished Goods"
7
:
“Consumables & Funeral Disbursements”"
8
:
"Total SubNaturalAccount"
9
:
"Movement"
10
:
"value"
id
:
"9ea89bbb-d1e4-c9fd-d954-557653b3e8fe"
instance
:
“dev”

Preview error:
{statusCode: 400, success: false, failed: true,…}
error
:
{message: “Elements does not match the cube’s dimension countnull”}
message
:
"Elements does not match the cube’s dimension countnull"
failed
:
true
message
:
"Elements does not match the cube’s dimension countnull"
statusCode
:
400
success
:
false


#7

Hi @Sb5,

Can you check that there are no other DBRs that need to be escaped?

Alternatively, can you try to put this single DBR on a simple page with only this component and see if it is still occurring?

Let us know how it goes.


Paul


#8

Same issue is happening if there is just one DBR on a page. I also tried to use &#44; instead of comma, however, the result was the same.


#9

Hi @aeremenko,

Can you provide in here the code you have used.


Paul


#10
<tm1-ui-dbr tm1-instance="dev" tm1-cube="General Ledger" tm1-elements="Forecast, AUD, 2017.FY, Total LOB-Brand, Total Company, All_Location, 'UE01 - Finished Goods, Consumables & Funeral Disbursements', Total SubNaturalAccount, Movement, value" tm1-read-only="true" tm1-data-decimal="2">
    </tm1-ui-dbr>

#11

Hi @aeremenko,

It should be the other way around. What is needed is for the text with special characters to be enclosed in double quotes, not single quotes.

So try it out for the tm1-elements at least. it should be in the form: tm1-elements=’ …, …, “special text, value here” ’


Paul


#12

I tried both ways. None works.


#13

Hi @aeremenko,

Thanks for testing it out. Please submit a ticket for this for further assessment.

Please do help indicate in there the Canvas version and a link to this topic too.

Cheers!
Paul


#14

Hi all,
has anybody either found a workaround or do we have a proper fix to this issue?
We faced the same problem today with the latest version on Canvas.

Thanks a lot in advance.
Regards,
Maurycy


#15

Hi @mmioduski,

Can you please provide an example after testing on a page without and other directives, i.e. just a single DBR.


#16

hi @tryan

Here is an example:

 <tm1-ui-dbr
        tm1-instance="c3"
        tm1-cube="Workflow Status"
        tm1-elements="{{$ctrl.settings['Dim Year']}}, B, Scenario, {{$ctrl.settings['Dim Product']}}, {{$ctrl.settings['Dim Country']}}, Status"
        ng-model="model_node_status"
        >
    </tm1-ui-dbr>

The issue is that {{$ctrl.settings[‘Dim Product’]}} can be something like “Middle East, Africa, Australia”


#17

Hi @rcantor,

Can you try below, single quotes around the whole string and double quotes are the element.

<tm1-ui-dbr
        tm1-instance="c3"
        tm1-cube="Workflow Status"
        tm1-elements='{{$ctrl.settings['Dim Year']}}, B, Scenario, "{{$ctrl.settings['Dim Product']}}", {{$ctrl.settings['Dim Country']}}, Status'
        ng-model="model_node_status"
        >
    </tm1-ui-dbr>

#18

Hi @tryan
This doesn’t work. It will just break the page and it won’t display or use the $ctrl.settings[] at all after that DBR.


#19

Hi @rcantor,

Where do you get the values for $ctrl.settings[…]? Try to hard code them first, to verify and to see that it is all working alright - as the comma may not be the issue.

Had tried an example with the following on our Canvas Sample TM1 server:

<select ng-model="values.account" class="form-control">
  <option>Property, Plant, Equipment</option>
  <option>Net Income</option>
</select>
<tm1-ui-dbr tm1-instance="dev" tm1-cube="General Ledger" tm1-elements='1,2014,Year,Local,1,1,"{{values.account}}",Amount'></tm1-ui-dbr>
<p>Selection: {{values.account}}</p>

This works on Canvas v3 at least.


Paul


#20

Hi @plim

This stil doesn’t work

<select ng-model="model_select" class="form-control">
      <option>{{$ctrl.settings['Product']}}</option>
    </select>
    <tm1-ui-dbr-hidden
        tm1-instance="c3"
        tm1-cube="Workflow Status"
        tm1-elements="{{$ctrl.settings['Year']}}, B, Budget, {{model_select}}, {{$ctrl.settings['Entity']}}, Status"
        ng-model="model_result"
        >
    </tm1-ui-dbr-hidden>
    <p>Selection: {{model_select}}</p>
    <p>result: {{model_result}}</p>

On a selection without comma we get:

while on the one with comma, we don’t get the result. We don’t even get the batch executed in the network tab.