Hi All want to create Ann expression Rule to check weather the array of values say rollnumber with the column field in the database .
Condition
If 2 value passed and one is there and another is not there then i don't want user to continued
Discussion posts and replies are publicly visible
Hi,
Are you looking for an expression to check if RollNumber1 and RollNumber2 both exist in the database?
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" }), "All Values Present", if( local!dataSet.totalCount >= 1, "Partially Present", "Not Present" ) ) )
What if one is present and another is not present .
If a user is entering two at a same time . If both are present then it should be restricted and if only one is present and another not then also it should be restricted and if both are not present then it should continue
Use the below expression
if( local!dataSet.totalCount = 0, true, /*continue*/ false, /*Restricted */ )