Retrieving non linked field

Hello, I’m trying to reduce the number of queries I’m using and wondered if anyone had a scenario like mine they could help with.

I have 2 tables, clients & leads linked by the client_id, so when a lead is added to the client, the client_id also gets inserted into the leads table. All good so far.

I now need to display all leads but also have the client name from the clients table added. I’ve done this via a query so far, but its not ideal as there are 23000+ records and it then becomes uneditable.

Is there any method to pulling/linking the client name into the leads table when adding a new lead to that client, so Id have client_id (1017) & client_name (gary brett) added to the lead record.

I’m using mysql by the way.

Thank you

I wonder if this is a possibility? Instead of the default add new record button, could I create a custom button with a URL maybe to do the same which inserts the client_name into a field?

So, client collection at the top with client record. Linked leads collection below for ‘Add New Lead To Client’.

Could I then somehow pre populate the client_name (and any other details I may need.

Click ~ mymodal/#clientname#clientemail for example?