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.084 seconds

Awards for the best Joomla app. This product is gonna win an award for this amazing job. Cook Self Service is the the best application from all over the Joomla universe ! It brings Joomla to a professional level really advanced for developers. It is a real fun to develop with it. The ACL part and security checks implementation are just... so much hours saved. I can now concentrate myself more on the design part and the creative works. Thank you so much. Guys I offer you all my congratulation ! Keep up the works because Joomla is needing it to increase the quality of extensions availables on the JED. I also learned a lot because I can see how to code at the proper place and I found all my answers reading the forum.
lack_hanson (JED)
          

Get Started