Hi.
I am now moving into the next phase of development on my Fabrik app.
I am designing a task scheduling form, which will allow users to set a task, with details and dates to do etc. - I also have a database of properties for sale and would like to be able to have a choice of linking a property with a task. I would like to see in the task form property address and price etc.
I have the two tables set up - 'tasks' and 'properties' and I have created an element 'property_id' in the task group which has a database join to the property table linking to the foriegn key od 'properties___property_id' and the foriegn value of 'properties___property address'. I have also created an 'inner join' from the task table 'property_id field to the properties table property id field.
When I view the form (default template) - i see that the initial dropdown join works as expected as I can see my properties in the dropdown list. I also see that the table join has worked as I can now see very field from the properties table. However when I select a propoperty I would like the property data to pre-populate but is doesn't.
Any ideas what I am doing wrong?
PS the primary key on tasks is 'task_id' and the primary key on properties is 'property id' but if I save a blank form I get the following...
Unknown column \'date_listed\' in \'field list\' SQL=INSERT INTO tasks ( `task_id`,`opened_date`,`detail`,`required_date`,`closed_date`,`priority_id`,`creator_id`,`owner_id`,`email_update`,`propstatus_id`,`property_id`,`property_address`,`hf_ref`,`notes`,`email_notes`,`tasktype_id`,`taskprogress_id`,`date_listed`,`date_lastpricerev`,`date_nextpricerev`,`date_lastad`,`date_lastcall`,`date_nextcall`,`date_exchange`,`date_aml`,`date_pma` ) VALUES ( \'\',\'0000-00-00 00:00:00\',\'test\',\'0000-00-00 00:00:00\',\'0000-00-00 00:00:00\',\'\',\'\',\'\',\'\',\'\',\'\',\'\',\'\',\'\',\'\',\'\',\'\',\'0000-00-00 00:00:00\',\'0000-00-00 00:00:00\',\'0000-00-00 00:00:00\',\'0000-00-00 00:00:00\',\'0000-00-00 00:00:00\',\'0000-00-00 00:00:00\',\'0000-00-00 00:00:00\',\'0000-00-00 00:00:00\',\'0000-00-00 00:00:00\' )Please ensure you have selected a primary key for your table, Fabrik can not process this join until you have done so
Cheers
Mark.
I am now moving into the next phase of development on my Fabrik app.
I am designing a task scheduling form, which will allow users to set a task, with details and dates to do etc. - I also have a database of properties for sale and would like to be able to have a choice of linking a property with a task. I would like to see in the task form property address and price etc.
I have the two tables set up - 'tasks' and 'properties' and I have created an element 'property_id' in the task group which has a database join to the property table linking to the foriegn key od 'properties___property_id' and the foriegn value of 'properties___property address'. I have also created an 'inner join' from the task table 'property_id field to the properties table property id field.
When I view the form (default template) - i see that the initial dropdown join works as expected as I can see my properties in the dropdown list. I also see that the table join has worked as I can now see very field from the properties table. However when I select a propoperty I would like the property data to pre-populate but is doesn't.
Any ideas what I am doing wrong?
PS the primary key on tasks is 'task_id' and the primary key on properties is 'property id' but if I save a blank form I get the following...
Unknown column \'date_listed\' in \'field list\' SQL=INSERT INTO tasks ( `task_id`,`opened_date`,`detail`,`required_date`,`closed_date`,`priority_id`,`creator_id`,`owner_id`,`email_update`,`propstatus_id`,`property_id`,`property_address`,`hf_ref`,`notes`,`email_notes`,`tasktype_id`,`taskprogress_id`,`date_listed`,`date_lastpricerev`,`date_nextpricerev`,`date_lastad`,`date_lastcall`,`date_nextcall`,`date_exchange`,`date_aml`,`date_pma` ) VALUES ( \'\',\'0000-00-00 00:00:00\',\'test\',\'0000-00-00 00:00:00\',\'0000-00-00 00:00:00\',\'\',\'\',\'\',\'\',\'\',\'\',\'\',\'\',\'\',\'\',\'\',\'\',\'0000-00-00 00:00:00\',\'0000-00-00 00:00:00\',\'0000-00-00 00:00:00\',\'0000-00-00 00:00:00\',\'0000-00-00 00:00:00\',\'0000-00-00 00:00:00\',\'0000-00-00 00:00:00\',\'0000-00-00 00:00:00\',\'0000-00-00 00:00:00\' )Please ensure you have selected a primary key for your table, Fabrik can not process this join until you have done so
Cheers
Mark.