You have to create a business attribute first. Add the values you need to it. In your WDE object find the option named like format-business-attribute and set as value the name of your business attribute. For the data to appear, the attached data key names that you fill in your strategy must match the attribute value names of your business attribute.
The business attributes are configured properly. In composer used userdata block to match the keys. I am not facing any difficulty in this step. I am facing trouble to attach datablock output to the variables.
The output are customer name and address. I have created two variables like name and address. Have to map this two db output values to the variables. how to do that. Guide me.
All is described in documentation - see fragment below:
Results are stored in a variable as a two-dimensional JSON array. This data can then be accessed via a Looping block or via scripting in the Assign or ECMAScript block. For example, if the database result set looks like this in tabular form:
Vegetables Animals
lettuce chicken
broccoli lion
The JSON for the result will look like this: {“db_result”:[[“lettuce”, “chicken”], [“broccoli”, “lion”]],“db_result_columns”:[“vegetables”, “animals”]}
So, all what you need to do is just write an ECMA script to read the returned values and assign them to any variables (existing or new ones).