Use string and numeric in the same table


#1

By default Canvas if you want to have in the same table numeric and string columns and you write a simple dbr:

<tm1-ui-dbr tm1-instance="dev" 
       tm1-cube="Sales Quota" 
       tm1-elements='"Actual",{{page.title.year}},"Year",{{employee.key}},"Comment"'
>
</tm1-ui-dbr>

you’ll be able to input comments but by default you’ll get 0 everywhere:

If you do not want to show 0 on every rows, you need to add to your tm1-ui-dbr tm1-default-empty="":

Now you’ll get the cubename instead of 0:

You can set up the default value you want to see using tm1-placeholder=“Enter…”

Final code for a string DBR:

<tm1-ui-dbr tm1-instance="dev" 
      tm1-cube="Sales Quota" 
      tm1-elements='"Actual",{{page.title.year}},"Year",{{employee.key}},"Comment"'
      tm1-placeholder="Enter..." 
      tm1-default-empty=""
>
</tm1-ui-dbr>