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
  • 0
    Certified Lead Developer
    in reply to saurabh sharma

    Hi,

    Hope the below code helps

    a!localVariables(
      local!dataSet: a!queryEntity(
        entity: "< DSE_Constant >",
        query: a!query(
          logicalExpression: a!queryLogicalExpression(
            operator: "AND",
            filters: {
              a!queryFilter(
                field: "rollnumber",
                operator: "in",
                value: { "AB000", "AB0001" }
              )
            },
            ignoreFiltersWithEmptyValues: true
          ),
          pagingInfo: a!pagingInfo(startIndex: 1, batchSize: 50)
        ),
        fetchTotalCount: true
      ),
      if(
        local!dataSet.totalCount = length({ "AB000", "AB0001" }),
        true(),
        false()
      )
    )

Children
No Data