Forums

where condition

economyweb 13 Oct, 2021
Answer
I have a list of customers in the page_list
When I edit a customer it opens perfectly in edit_customer_page and I can modify and update it.
Below the customer data I show a table with the related contacts of this customer.

For this I have a read data that reads the contacts table and shows them ALL.
I need to put a where condition to limit only those of the client in edit.

When I put it:
where condition -> contacts.company = {var: customer.id}

debug shows:
select contacts where company = ' '
It seem that, {var: customer.id} has no value and is just the one that I have active on the screen.
GreyHead 14 Oct, 2021
Hi economyweb,

The Debugger output should also show you where the customer id is in the form data.

Bob
You need to login to be able to post a reply.