Turning query results into array

Dear all,

I need to turn the results of the below query into an array including all "submissionunit"s to further use the wherecontains() formula on that.

Could anybody tell me which function to use to create an array in that case?

local!datasubset2: a!queryEntity(
      entity: cons!MR_ABGABE_DSE,
      query: a!query(
        selection: "submissionunit",
        filter: a!queryFilter(
          field: "submissionperiod",
          operator: "=",
          value: local!period
        ),
        pagingInfo: local!pagingInfo2
      ),
      fetchTotalCount: false
    )

Thank you very much in advance!

Chris

  Discussion posts and replies are publicly visible

Parents
  • a!queryEntity will return a datasubset. You can index into datasubset using the field 'data', for example 'local!datasubset2.data' and this will return a list of dictionary. Appian dictionaries can be sliced, this means you can also index into a specific field to get a list of data for that field. For example, 'local!datasubset2.data.submissionunit'. However, since indexing with dot notation might break if the field does not exist, I recommend using the index function. 'index(local!datasubset2.data, "submissionunit", {})'

Reply
  • a!queryEntity will return a datasubset. You can index into datasubset using the field 'data', for example 'local!datasubset2.data' and this will return a list of dictionary. Appian dictionaries can be sliced, this means you can also index into a specific field to get a list of data for that field. For example, 'local!datasubset2.data.submissionunit'. However, since indexing with dot notation might break if the field does not exist, I recommend using the index function. 'index(local!datasubset2.data, "submissionunit", {})'

Children
No Data