Buy Now
Sign in

correct syntax for filters on Read Data functions?

stikkimorey , August 21 at 13:04
Answered
S
stikkimorey
Hi
I am trying to filter results in a Data Read function using:
model.field/<:{data:field}
I also tried
model.field:/<{data:field}
But these are not working for me. What is the correct way to do it in Chronoconnectivity?
Many thanks
S
simelas
Hi,
use /- in case no data is sent . otherwise correct syntax is your first one
if for example model.id/<:1 gives you a result by filtering correctly then check if your field {data:field} is containing the correct value or is at the right place.
model.field/<:{data:field}/-
Ensure also that your data inputs are into a form ( chronoform or chronoconnectivity)
:-)
S
stikkimorey
Thanks for that very clear answer.
There seemed to be a problem getting the {data:field} values, not sure why, but anyway I specified them from the read data function using :
{var:read_function_name.Model.field}
and now all good
:-)
S
simelas
Hi Stikkimorey,
Maybe worth precising that:
- if you want to get data from a form then use {data:field} or {data:Model.field}
- if you want to get data from a read data function then use {var:read_function_name.Model.field}
simelas
:-)