ListPage Fields - Data from another table

4 posts by 2 authors in: Forums > CMS Builder
Last Post: May 28, 2009   (RSS)

By Kenny - May 27, 2009

I have two sections - Clients & Maintenance

In the Client section it list the client Name and Address

In the Maintenance section it has a drop down list that pulls the client names from the Client section.

Now what I need to do is get the address to show up on the ListPage Fields for the Clients section from the maintenance section.

When I enter in a new entry in the maintenance section, I choose a client from the Client dropdown list. It shows me their name, but not their address. That's cool, though. Now I click save and it takes me back to the listings index. I want my ListPage Fields to be Maintenance Type, Name, and {address}. The Name and Address come from the Clients section though.

Any good ideas?


Kenny

Re: [sagentic] ListPage Fields - Data from another table

By Dave - May 28, 2009

Hi Kenny,

It doesn't support that feature by default.

A couple options. We (or you) could modify your version to make the clients.fieldname fields available in the field list. This would require some custom programming, I could point you in the right direction or you could email me direct and we could discuss it.

Or a simple fix would be to load the client name and address as one value. To do that you select "Get Options From MySQL" in the field editor and use some mysql like this:

SELECT CONCAT_WS(' - ',name,address),
CONCAT_WS(' - ',name,address)
FROM cms_clients


The only issue with the second method is if you change the address later it won't update the previously selected values.

Hope that helps! Let me know if either of those will work for you.
Dave Edis - Senior Developer
interactivetools.com

Re: [sagentic] ListPage Fields - Data from another table

By Dave - May 28, 2009

hehe, ok, sound good! :)
Dave Edis - Senior Developer
interactivetools.com