Fail to create related records

A place for users and developers of the Xataface to discuss and receive support.

Fail to create related records

Postby falcon7 » Thu Mar 17, 2011 9:27 am

I am building a purchase order tracking system. I want to have a table all the POs, with a one-to-many relationship to a table with the individual items in a PO. I have two tables, purchases and reqitems, with the following file in .../tables/purchases:
[bill of materials]
__sql__ = "SELECT * FROM reqitems WHERE reqid = '$reqid'"

reqid is a field in each table, and is indexed in each table.

In the Xataface interface, the 'bill of materials' comes up correctly for a record in purchases, and I am offered the opportunity to insert a new record. However, whenever I fill in the fields and hit Save, the input screen clears, and no record is created.

Anyone have an idea what might be wrong?

thanks,
James
falcon7
 
Posts: 7
Joined: Sat Sep 20, 2008 9:44 am

Re: Fail to create related records

Postby shannah » Thu Mar 17, 2011 9:44 am

One thing is that xataface doesn't like spaces in relationship names. This could be causing a problem. If you want spaces in the relationship tab you could use the action:label directive.
e.g.
Code: Select all
[bill_of_materials]
  __sql__ = "...."
  action:label="Bill of Materials"



-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Fail to create related records

Postby falcon7 » Thu Mar 17, 2011 10:10 am

Excellent, that solved the problem. Thanks!
falcon7
 
Posts: 7
Joined: Sat Sep 20, 2008 9:44 am


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 17 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved