Error

I am getting error "Invalid index: Cannot index property 'crProductLimitCode_int' of type Text into type DataSubset" ,Can anyone suggest on this?

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    If you're trying to get this data via a!queryEntity() or similar methods, you will need to get the ".data" property from the query results before getting entity-specific properties.  That would look like "local!dataSubset.data.crProductLimitCode_in". 

    However please be aware that if the query returns zero rows for whatever reason, the "data" subcomponent won't have any named properties and using dot notation would break in that case.  Here we could handle it by expanding it slightly to use the property() function to get the property safely, like: "property(local!dataSubset.data, "crProductLimitCode_in", null())", which will safely return a NULL value if the query returned zero data rows.

Reply
  • 0
    Certified Lead Developer

    If you're trying to get this data via a!queryEntity() or similar methods, you will need to get the ".data" property from the query results before getting entity-specific properties.  That would look like "local!dataSubset.data.crProductLimitCode_in". 

    However please be aware that if the query returns zero rows for whatever reason, the "data" subcomponent won't have any named properties and using dot notation would break in that case.  Here we could handle it by expanding it slightly to use the property() function to get the property safely, like: "property(local!dataSubset.data, "crProductLimitCode_in", null())", which will safely return a NULL value if the query returned zero data rows.

Children