Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Dynamic list with foreign key 15 May 2012 19:46 #2357

  • msr43
  • msr43's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 19
  • Thank you received: 0
Unable to generate a dynamic list field using the foreign key.It shows up a simple textbox instead of the combo box with the values from the foreign table.

Regards
MSR

Please Log in or Create an account to join the conversation.

Re: Dynamic list with foreign key 16 May 2012 03:47 #2360

  • msr43
  • msr43's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 19
  • Thank you received: 0
Finally I figured it out...It works great...

Only issue is that it pulls up all the data from the foreign key table.Even with rows mentioned as UnPublished in the foreign key table but it honors with view access level.

Also, Can I pull up only a subset of value from the foreign key table by using a where clause?

Usecase:

For Example all the reusable lists in enterprise application comes from one table and we call it as a lookup table.When querying the data for the specific list, we will add the where clause dynamically to filter the data.

Regards
MSR

Please Log in or Create an account to join the conversation.

Re: Dynamic list with foreign key 19 May 2012 11:14 #2380

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
The preparation of the data is processed in the View File.

Directly in the view, you can add a Where statement to the model that is queriing the datas.

For instance :
$myModel->addWhere('a.foo = ' . (int)$myValue );
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.055 seconds

First of all... I have to congratulate you guys for the awesome tool... I came here only to see what this thing was up to and I have to tell that I'm very impressed with what this tool can do. French guys are making a revolution on Joomla... first with Seblod and now Cook...
Griiettner (forum)

Get Started