Cannot index property 'permittedTeRange' of type String into type List of Variant

a!queryEntity(
                        entity: cons!TEMS_ENTITY_V_TE_DETAILS,
                        query: a!query(
                          paginginfo: a!pagingInfo(1, - 1),
                          logicalexpression: a!queryLogicalExpression(
                            operator: "OR",
                            filters: {
                              a!queryFilter(
                                field: "cafNumber",
                                operator: "=",
                                value: tostring(local!selectedCaf)
                              )
                            }
                          )
                        ),
                        fetchTotalCount: true
                      ).data

Hi All,

I am getting the error "Cannot index property 'permittedTeRange' of type String into type List of Variant". I have attached the code above. Can anyone please help me out.

  Discussion posts and replies are publicly visible

Parents
  • I don't know why you didn't continue working this in your first thread on the same topic, but this will need to be resolved in the code for your text field, please share that instead.  The queryEntity call above should work fine, although I would prefer the AND operator instead of OR in this scenario (but same result with only one filter).

    As already noted in both threads, you cannot reference a field with dot notation if the data set is empty.  You will need to utilize either the index() function or (my preferred) property() function, in the text field display, as:

    property(local!data,"permittedTeRange",null)

Reply
  • I don't know why you didn't continue working this in your first thread on the same topic, but this will need to be resolved in the code for your text field, please share that instead.  The queryEntity call above should work fine, although I would prefer the AND operator instead of OR in this scenario (but same result with only one filter).

    As already noted in both threads, you cannot reference a field with dot notation if the data set is empty.  You will need to utilize either the index() function or (my preferred) property() function, in the text field display, as:

    property(local!data,"permittedTeRange",null)

Children
No Data