Welcome, Guest
Username: Password: Remember me

TOPIC: Newbie - combining results from two tables in view

Newbie - combining results from two tables in view 09 Jul 2017 23:11 #15246

Okay, so I am probably being a bit stupid but I am trying to work out how to do the following with your system - need to know how to do this/that I can do this before forking out the cash!!!

I have a simple component with 2 tables - projects and images.

The images table has a collection of images which are linked again specific projects. An image will only ever be linked to one project.

I want to create a view for a project that includes all of the linked images

How can I do that?
The administrator has disabled public write access.

Newbie - combining results from two tables in view 10 Jul 2017 15:43 #15247

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 984
  • Karma: 140
You need to use the relations.

Open your "Project" layout (item or list)
Browse the fields tree and look at the last node of your fields, it should be a Cross-Reference (XREF) towards "Images". You get it ?
Open this XREF Node, and choose the value to show. Drag and drop into a list/fly, or form, and you are done.

You created a N:1 relation.
Simple as that. But I know the docs are still missing...
Coding is now a piece of cake
The administrator has disabled public write access.

Newbie - combining results from two tables in view 10 Jul 2017 15:55 #15248

Thank you, that makes sense, but it isn't producing what I am looking for (although that is going to me!)
I have several images associated with a project, but it is not showing them.
How do I tell it to loop through all of the images?

Thanks
The administrator has disabled public write access.

Newbie - combining results from two tables in view 17 Jul 2017 21:36 #15249

worked it out - all workign now.
Last Edit: 17 Jul 2017 21:36 by Jonhubbard. Reason: marked as complete
The administrator has disabled public write access.
Time to create page: 0.089 seconds

Get Started