Buy Now
Sign in

correct syntax for filters on Read Data functions?

stikkimorey , August 21 2018, 13:04
S
stikkimorey 72
August 21 2018, 13:04 #379739
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 173
August 21 2018, 21:23 #379758
 Answer
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 72
August 22 2018, 08:19 #379765
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 173
September 17 2018, 21:14 #380227
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
:-)