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
is the code is correct . I dont have nay thing right now in the database . I just trying to create an expression rule
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" )
Hi Selvakumar , Is this code test both values in an array one by one . If one value is present in an table and other is not there . What will happen this case
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() ) )