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