Expression Rule

Certified Associate Developer

Hi  All ,  How to create a expression Rule where I want to check single or multiple mobile number is present or not  in a DB .

Ex   1234,4567 present in a data base . If these two are there then return true else false  

  Discussion posts and replies are publicly visible

Parents Reply
  • The code has no issues, but you need to add a null check like below to achieve your requirement:

    if(
      isnull(
        a!queryEntity(
          entity: < DSE_Constant > ,
          query: a!query(
            logicalExpression: a!queryLogicalExpression(
              operator: "AND",
              filters: {
                a!queryFilter(
                  field: "siteid",
                  operator: "in",
                  value: { "AB000", "AB0001" }
                )
              },
              ignoreFiltersWithEmptyValues: true
            ),
            pagingInfo: a!pagingInfo(startIndex: 1, batchSize: 50)
          ),
          fetchTotalCount: false
        ).data
      ),
      "Not Present",
      "Present"
    )

Children