Hi,
I setup a CF to get records from a database table.
It works fine if "First matching record” is chosen, the record can be displayed. I use {var:read_data3.Product.name} to display the content.
However, if “All matching record” is used, nothing shown can be shown.
I think I may wrongly use the {var:read_data3.Product.name} in the design section,
but have no Idea what to do to fix the problem.
Thanks a lot in advance for your help.
I setup a CF to get records from a database table.
It works fine if "First matching record” is chosen, the record can be displayed. I use {var:read_data3.Product.name} to display the content.
However, if “All matching record” is used, nothing shown can be shown.
I think I may wrongly use the {var:read_data3.Product.name} in the design section,
but have no Idea what to do to fix the problem.
Thanks a lot in advance for your help.
If you get all matching, you're not getting ONE record you're getting all the matching records. So instead of {var:read_data#.model.field} you need to use {var:read_data#.[index].model.field} where [index] is a number from 0 to however many records you have.
How exactly are you trying to display the data?
How exactly are you trying to display the data?
Dear Healyhatman,
Thanks for your helpful advice.
I try to achieve the following:
If there are 3 matched records, then I can show these three records in a table, if there are 4 matched records, then these four records will be shown in a table and so on...
I also want to click on a record, so that I can be redirected to another CF for update or delete.
Is this possible?
Regards,
Eric
Thanks for your helpful advice.
I try to achieve the following:
If there are 3 matched records, then I can show these three records in a table, if there are 4 matched records, then these four records will be shown in a table and so on...
I also want to click on a record, so that I can be redirected to another CF for update or delete.
Is this possible?
Regards,
Eric
Yeah that's all fine. You can use {var:read_data3} as the data source for your list, and put the columns in accordingly

And in the Cell to show the data you would use {var:llist_table###.row.Model.Fieldname}
A link to the record you could do using id={var:list_table###.row.Model.id} as a URL parameter in the link.

And in the Cell to show the data you would use {var:llist_table###.row.Model.Fieldname}
A link to the record you could do using id={var:list_table###.row.Model.id} as a URL parameter in the link.
This topic is locked and no more replies can be posted.