Hi
how can i write above query in ER?
can anyone help me with this?
i have tried but it gives error
Discussion posts and replies are publicly visible
In the "Value" field, you need to remove the double quotes and add ri! instead. What you have done right now is you are comparing an Integer field (groupCif_int) with a string ("liabilityNumber_int"). So instead of "liabilityNumber_int" it should be ri!liabilityNumber_int
i have tried with that also
when i given ri it is not filtering all data it is giving
so can you please let me know how can i write ER for this query
can you please look into this query and let me know
what is the datatype for GCIF and Liability_Number?
all are integer - gcif, cif, liability_number
a!queryLogicalExpression( operator: "AND", filters: { a!queryFilter( field: "GCIF", operator: "=", value: ri!gcif ), a!queryFilter( field: "LIABILITY_NUMBER", operator: "=", value: ri!liabilityNumber ), a!queryFilter( field: "CIF_TYPE", operator: "=", value:"Parent" ) })
please replace your code with the above one and add two rule input variables 1) gcif number(integer) 2) liabilityNumber number(integer). I am not sure why you took GCIF 2 times in where conditions.
I have taken a look and that is what I am suggesting. You have configured it incorrectly. Please take a look the screenshots above and try the suggested approach.
this is how i get data from that query
so in this data i'll give one gcif data and will get only that row
this is what i required from ER
so i have used 2 gicfs
and this will give me all the rows in this i have to filter it
in the screenshot, GCIF,Liability_Number and CIF is same for all. Then please use the below expression for the querylogicalExpression.
Note: you have to change the field name(GCIF, CIF_TYPE) in the code. for the please refer your cdt. Rule input GCIF is of integer type.
a!queryLogicalExpression( operator: "AND", filters: { a!queryFilter( field: "GCIF", operator: "=", value: ri!gcif ), a!queryFilter( field: "CIF_TYPE", operator: "=", value:"Parent" ) })
For reference:
It seems like the fields do not match. And when you configure it to ignore any filter having no values, then pass no value, this filter will be ignored and you get more items than expected.
Make sure to use the right rule inputs for each field and either pass values or switch off "ignoreFiltersWithEmptyValues".