Appian Community and Appian Academy are being upgraded. From July 24–August 3, the Appian Community will be in read-only mode. During this time, the site will be read-only and user registration will be disabled. We apologize for any inconvenience this may cause, but a more secure, stable, and performant Community experience is coming soon!

The new Appian Community launches August 3, followed by Appian Academy on August 7. During the migration, Appian Community Edition, Appian Academy, Documentation, Certifications, Instructor-led Customer Training, Partner Sales Training & Accreditation, and Forum (for Appian Partners and Customers only) will remain available.

Filter nested CDT value from QueryEntity Result

Howdy,

1st time post.

I'm facing a particular issue with my Query Entity results. Essentially, we need to filter out (not include) inactive equipment in a nested CDT structure. The QueryEntity rule queries against an parent order and has equipment (nested CDT) numbers associated. The results return all equipment records regardless if the equipment is active or inactive. Would there be a way to effectively retrieve the order form only with active equipment?

Query Entity Expression:

a!queryEntity_18r3(
  entity: cons!EMS_DB_RM_UPDATE_MOTOR,
  query: a!query(
    pagingInfo: ri!pagingInfo,
    logicalExpression: a!queryLogicalExpression(
      operator: "AND",
      filters: {
        if(
          rule!HAL_checkNullOrEmpty(
            ri!toolServiceId
          ),
          null,
          a!queryFilter(
            field: "motorToolServiceId",
            operator: "=",
            value: ri!toolServiceId
          )
        ),
        a!queryFilter(
          field: "isActive",
          operator: "<>",
          value: false
        )
      }
    )
  )
)

Results:

DataSubset

    • startIndex1(Number (Integer))
      • batchSize-1(Number (Integer))
        • sortList of SortInfo - 1 item
            • SortInfo
                • field"isActive"(Text)
                  • ascendingtrue(Boolean)
                • totalCount1(Number (Integer))
                  • dataList of Dictionary - 1 item
                      • Dictionary
                          • equipmentList of EMS_MotorEquipment - 2 items
                              • EMS_MotorEquipment
                                  • id189(Number (Integer))
                                    • sapEquipmentNumber"11851552"(Text)
                                      • motorId308(Number (Integer))
                                        • createdBy"user@oilandgas.com"(Text)
                                          • createdOn12/17/2020 12:12 PM CST(Date and Time)
                                            • updatedBy"user@oilandgas.com"(Text)
                                              • updatedOn12/17/2020 12:12 PM CST(Date and Time)
                                                • isActive true(Boolean)
                                                • EMS_MotorEquipment
                                                    • id194(Number (Integer))
                                                      • sapEquipmentNumber"11851531"(Text)
                                                        • motorId308(Number (Integer))
                                                          • createdBy"user@oilandgas.com"(Text)
                                                            • createdOn12/17/2020 4:30 PM CST(Date and Time)
                                                              • updatedBy"user@oilandgas.com"(Text)
                                                                • updatedOn12/17/2020 4:30 PM CST(Date and Time)
                                                                  • isActive false(Boolean)
                                                                • isActivetrue(Boolean)
                                                                  • updatedOn12/17/2020 4:30 PM CST(Date and Time)
                                                                    • updatedBy"user@oilandgas.com"(Text)
                                                                      • available2(Number (Integer))
                                                                        • statusId296(Number (Integer))
                                                                          • motorToolServiceId2052(Number (Integer))
                                                                            • motorId308(Number (Integer))
                                                                          • identifiersList of Number (Integer) - 1 item
                                                                              • 308(Number (Integer))

                                                                            Hope to hear your thoughts on this one.

                                                                            Much appreciated,
                                                                            JT

                                                                              Discussion posts and replies are publicly visible

                                                                            Parents Reply Children
                                                                            No Data