What's new in Customer Journeys?

Connect and learn more!
How to pass alias.data from bind-for-each into action for button onclick event — Cloud Customer Connect
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

How to pass alias.data from bind-for-each into action for button onclick event

Received Response
54
Views
5
Comments

Summary:

Greetings,

I'm trying to pass alias.data from a top level bind-for-each into an action as a parameter, but I'm getting a reference error when doing so.

              

Content (required):

I have a data setup that uses 2 levels of bind-for-each components. I gave my top level bind-for-each an alias in the template's Data-Oj-As value ("levelOne"), which looks like this: <template data-oj-as="levelOne">.

Now in my inner bind-for-each, I want to pass the alias.data (levelOne.data) as a parameter into an action for an onclick button event. However, when my onclick event fires I get an error saying:

"Could not evaluate expression levelOne.data: ReferenceError: levelOne is not defined".

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!