Hello all,
I hope I can adequately explain my problem. Thanks in advance for your patience and I appologize for a lengthy intro to the problem but I feel I need to give some background information to help explain.
1. When a user clicks on the menu item "Equipment List", a list of equipment is displayed. This list is generated using a Connectivity app called list_equipment. The list pulls data from a table called equiplist which contains information such as tag number, model, serial #, etc. Tag #, Type, Brand, Model are the only information displayed though the table contains more information.
2. The connectivity app (list_equipment) is set up to pull data from two tables (equiplist & equiploc) so that if the user clicks on the tag number, it brings up a form called equip_details which displays all of the details for that piece of equipment (from the equiplist table) and a list of the locations the equipment has been (from the equiploc table). When I initially set up my site, I imported some test records. When I select the "Equipment List" menu item, these records are displayed as planned. I can then click on a tag # and I am able to display the detailed information on the equipment as well as see a list of the locations. So far so good.
3. When a user wants to add a piece of equipment, they select the "Add" menu item. A form is displayed asking for equipment information that will then add a new record to the equiplist table. However, when I add a piece of equipment I can use phpmyadmin and verify that the new record was indeed added to the equiplist table, but the record does not show up when the "Equipment List" menu item is selected. I do have a filter in the Where statement of the connectivity app so I removed it to make sure I wasn't inadvertently filtering out the new records. The filter is not causing the problem.
I also thought it may have something to do with model ID's but the records I imported did not use it and the Add equipment form doesn't use model IDs since I'm only dealing with one table.
I'm really baffled here. Any thoughts as to why new records are not being displayed even though they are in the table?
Thanks in advance for all your help!!
I hope I can adequately explain my problem. Thanks in advance for your patience and I appologize for a lengthy intro to the problem but I feel I need to give some background information to help explain.
1. When a user clicks on the menu item "Equipment List", a list of equipment is displayed. This list is generated using a Connectivity app called list_equipment. The list pulls data from a table called equiplist which contains information such as tag number, model, serial #, etc. Tag #, Type, Brand, Model are the only information displayed though the table contains more information.
2. The connectivity app (list_equipment) is set up to pull data from two tables (equiplist & equiploc) so that if the user clicks on the tag number, it brings up a form called equip_details which displays all of the details for that piece of equipment (from the equiplist table) and a list of the locations the equipment has been (from the equiploc table). When I initially set up my site, I imported some test records. When I select the "Equipment List" menu item, these records are displayed as planned. I can then click on a tag # and I am able to display the detailed information on the equipment as well as see a list of the locations. So far so good.
3. When a user wants to add a piece of equipment, they select the "Add" menu item. A form is displayed asking for equipment information that will then add a new record to the equiplist table. However, when I add a piece of equipment I can use phpmyadmin and verify that the new record was indeed added to the equiplist table, but the record does not show up when the "Equipment List" menu item is selected. I do have a filter in the Where statement of the connectivity app so I removed it to make sure I wasn't inadvertently filtering out the new records. The filter is not causing the problem.
I also thought it may have something to do with model ID's but the records I imported did not use it and the Add equipment form doesn't use model IDs since I'm only dealing with one table.
I'm really baffled here. Any thoughts as to why new records are not being displayed even though they are in the table?
Thanks in advance for all your help!!
Hi chriso0258,
Please try turning the CC Debugger on. It's on the General | Advanced tab right at the bottom. I think this will show you the database queries that are being used. That may give some clues.
Bob
Please try turning the CC Debugger on. It's on the General | Advanced tab right at the bottom. I think this will show you the database queries that are being used. That may give some clues.
Bob
Hello Greyhead,
Thanks for the reply. Here is a copy of the debugger info (which I set before dbsave):
It must have something to do with the "Multi Tables Settings". When I disable the setting, all the equipment shows up just fine. When I enable it, the new records don't show up. I may be configuring it incorrectly. There is no difference in the debugger information whether enabled or disabled.
Here is a pic of the multi table page. The default settings are on the other tabs.
[attachment=1]multi-table_general.png[/attachment]
Here is a picture of the dbsave.
[attachment=0]dbsave.png[/attachment]
Thanks for the reply. Here is a copy of the debugger info (which I set before dbsave):
Data Array:
Array
(
[chronoform] => add_equipment
[event] => submit
[Itemid] => 521
[option] => com_chronoforms
[view] => form
[State_Tag] => Z987654
[Equip_Type] => Computers
[Brand] => Lenovo
[Model] => Klms654456
[Serial_No] => 123456789
[Memory] => 6 GB
[Prod_Key] => 456789123456456123
[DOP] => 2012-12-14
[Warranty] => 2012-12-31
[Notes] => None
[Surplus_status] => a
[submit] => Submit
[166274cd08f82ca398364014590bb01f] => 1
[user_id] => bi01d35
[date_created] => 12-14-2012
)
Validation Errors:
Array
(
)
It must have something to do with the "Multi Tables Settings". When I disable the setting, all the equipment shows up just fine. When I enable it, the new records don't show up. I may be configuring it incorrectly. There is no difference in the debugger information whether enabled or disabled.
Here is a pic of the multi table page. The default settings are on the other tabs.
[attachment=1]multi-table_general.png[/attachment]
Here is a picture of the dbsave.
[attachment=0]dbsave.png[/attachment]
Hi chriso,
I've spotted a problem in your config, your first associated table has model ID = "equiploc" and its related to "equiploc" ??!! this is wrong, it has to be related to another (and already defined) model, which I suppose is the "equipinfo" model.
Regards,
Max
I've spotted a problem in your config, your first associated table has model ID = "equiploc" and its related to "equiploc" ??!! this is wrong, it has to be related to another (and already defined) model, which I suppose is the "equipinfo" model.
Regards,
Max
Hi Max.
I made the change as you suggested but still having the same problem. Since the problem seems to be with joining the two tables, I was wondering if because the equiploc table has no entries for the new equipment (since only the initial equipment information was provided), if it would exclude it from the listing.
I'm experimenting with this idea by using a multipage form on which page 1 will enter the initial data in the equipinfo table first, then on the second page, it will pull up the index id of the new item (which will be a foreign key in the equiploc table) and a form for filling in the location information which, upon submission, will update the equiploc table with the new item. I'm hoping that by having some information in the equiploc table, it will then pull up on the listing.
Unless you have some other thoughts, I'll look into this and let you know.
I made the change as you suggested but still having the same problem. Since the problem seems to be with joining the two tables, I was wondering if because the equiploc table has no entries for the new equipment (since only the initial equipment information was provided), if it would exclude it from the listing.
I'm experimenting with this idea by using a multipage form on which page 1 will enter the initial data in the equipinfo table first, then on the second page, it will pull up the index id of the new item (which will be a foreign key in the equiploc table) and a form for filling in the location information which, upon submission, will update the equiploc table with the new item. I'm hoping that by having some information in the equiploc table, it will then pull up on the listing.
Unless you have some other thoughts, I'll look into this and let you know.
Hi Chriso,
You can do the 2 saves in 1 step using 2 dB Save actions, you will have the new record id available in the data array after the first db save.
What about the debug output of the connectivity listing ? please enable it under the "General > Advanced" tab, you should be able to see how the data is retrieved, if your associated table returns no data then no associated record data will be available, but if you are sure that there is an associated record then you should check the SQL queries generated and see if anything is wrong.
Do you have a value in the "State_Tag" in the equipeloc matching the value in cf_id in the equipeinfo ??
Regards,
Max
You can do the 2 saves in 1 step using 2 dB Save actions, you will have the new record id available in the data array after the first db save.
What about the debug output of the connectivity listing ? please enable it under the "General > Advanced" tab, you should be able to see how the data is retrieved, if your associated table returns no data then no associated record data will be available, but if you are sure that there is an associated record then you should check the SQL queries generated and see if anything is wrong.
Do you have a value in the "State_Tag" in the equipeloc matching the value in cf_id in the equipeinfo ??
Regards,
Max
This topic is locked and no more replies can be posted.