I am trying to create an Expression rule that returns true if a specific piece of data is present in a specific column of a db but I feel like I am not doing it in an efficient way.
My situation is analogous to this situation:
Database table with employee contact information. Trying to see if 111-222-3333 is present in the phone number column of the table.
I am attaching an image of how I am attempting it and I feel like I am making it more complicated then it should be.
Thanks
Discussion posts and replies are publicly visible
if( property( a!queryEntity( entity: <cons....>, query: a!query( selection: a!querySelection( columns: { a!queryColumn( field:"siteid" ) } ), filter: a!queryFilter( field: "siteid", operator: "=", value: ri!siteid ), paginginfo: a!pagingInfo( startIndex: 1, batchSize: 1 ) ) ).totalCount>0, "siteid",false)=ri!siteid, "Request Already Generated", "Request Not Generated")
I am getting this Error:
Expression evaluation error at function a!queryEntity [line 3]: An error occurred while retrieving the data. Details: Unexpected error executing query (type: [TWMDecomRequestSitesDT12021], query: [queryentity expression], order by: [[Sort[siteid asc]]], filters:[(siteid = TypedValue[it=3,v=AB000444])])
Your query entity execution is failing. Check your Appian Tomcat Logs, it can provide more information on why query entity call is failing.