Hi All,
I am getting the error if multiple matches exist for the filter criteria. Below given is the code. Can anyone please help me out?
a!queryEntity( entity: cons!TEMS_ENTITY_V_TE_DETAILS, query: a!query( paginginfo: a!pagingInfo(1, - 1), logicalexpression: a!queryLogicalExpression( operator: "OR", filters: { a!queryFilter( field: "cafNumber", operator: "=", value: tostring(local!selectedCaf) ) } ) ), fetchTotalCount: true ).data
Discussion posts and replies are publicly visible
Hi shubhamy,
1.) please try this function for inserting code.
This makes the life of your content reader way easier.
2.) What is the error telling you, can you insert as well?what is the overall use case? Often its not an issue of your query and more of the usage of the query.
3.)
shubhamy0001 said: a!queryLogicalExpression( operator: "OR", filters: { a!queryFilter( field: "cafNumber", operator: "=", value: tostring(local!selectedCaf) ) } )
a) why are you using "OR"?
b) why are you using querylogialexpression and not just the "filter" parameter of your query if you are looking for just one value in your DB?
c.) is "local!selectedCaf" multiple?
Hi Richard,
I am getting the following error:
Could not display interface. Please check definition and inputs. Interface Definition: Expression evaluation error at function a!textField [line 1606]: Invalid index: Cannot index property 'permittedTeRange' of type String into type List of Variant.
Yes, local!selectedCaf can be multiple in dropdown but user will select only one.
Hi, can try type casting the data type to the required CDT type.
It sounds like your returned data set is empty based on that error message. First I would suggest updating the a!textField()'s value parameter to is the property() function as:
property(local!data,"permittedTeRange",null)