How to retrieve rows from entity data type

Certified Associate Developer

I have a data with following format-

[entity: somevalue , data:[id:1,name:a],[id=2,name:b]

Now i need to pass data part in loop. As it has 2 occurrences for data so loop should run two times. And for each occurrence it should pas only relevant data.

1st occurrence-  [entity: somevalue , data:[id:1,name:a]

2nd occurrence-  [entity: somevalue , data:[id=2,name:b]

As data is type of array so not able to do indexing here.

Any suggestion.

  Discussion posts and replies are publicly visible

Parents Reply
  • deepakg's example is essentially it, here's the same just with a specific Entity Data type utilized.  What are you doing with the data?  Passing it where?

    a!localVariables(
      local!data: a!entityData(
        entity: cons!COE_DS_SAMPLE,
        data: {
          {id: 1, name: "test 1"},
          {id: 2, name: "test 2"}
        }
      ),
      
      a!forEach(
        items: local!data.data,
        expression: {
          /* each data set can be utilized here */
          fv!item
        }
      )
    )

Children