Skip to main content
saurabhs0003
September 10, 2021
Question

Expression Rule

  • September 10, 2021
  • 14 replies
  • 0 views

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  

    14 replies

    selvakumark
    September 10, 2021

    Hi,

    You can use the a!queryEntity() function to retrieve data from the database with the values as filters and based on the results you can return the boolean value.

    saurabhs0003
    September 10, 2021

    In that How can I check with Multiple values (two or three) . 

    selvakumark
    September 10, 2021

    Here's a sample code:

    a!queryEntity(
      entity: ,
      query: a!query(
        logicalExpression: a!queryLogicalExpression(
          operator: "AND",
          filters: {
            a!queryFilter(
              field: "phoneNumber",
              operator: "in",
              value: { "12345", "56789" }
            )
          },
          ignoreFiltersWithEmptyValues: true
        ),
        pagingInfo: a!pagingInfo(startIndex: 1, batchSize: 50)
      ),
      fetchTotalCount: false
    ).data