Google CMS question


#1

Hi All!

I am using an ObjectArray type for an intent and found myself trying to use a parameter, much like here in this link:

I am using this.$cms.t('testVar', {name: 'beethoven'}) successfully for my responses sheet, but when using this.$cms.MyIntent[0].responseTwo({name: 'beethoven'}) I get an error stating this is not a function.

Am I missing the right way to do this?


#2

I’m not 100% sure what you’re trying to do, but most likely you want to replace:
this.$cms.MyIntent[0]
with
this.$cms[MyIntent[0]]


#3

@321dev, that’s not working.

What I am trying to do is use this.$cms.MyIntent[0].responseTwo in two places, for a display card and for speech. Getting this response is not a problem at all. Accessing the {{name}} parameter within it is where I am having a problem.


#5

The parameter feature is one provided by the i18next integration and currently only works for Responses sheets, unfortunately. Good thought though! We should think about adding this to all sheet types


#6

ahh, ok, that makes sense. and t() meaning translation makes it click even more!

Thanks @321dev and @jan!