INSERT new record to the related table?

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

INSERT new record to the related table?

Postby muzafar » Wed Jan 18, 2012 3:36 am

Greetings,
I have two related tables. One is requisition and other one is requisition_items. Requisition is the main table which contain fields like
Id (PK),
req_no,
name,
date.

And requisition_items table contains fields,
id,
item_name,
unit,
requisition_id(FK).

Now what I want is, that I want to show the form like this.

Name: _______TextField__________
Date: ________TextField____________
Item Name _________TextField___________
Unit: _________Select List________

I am trying to use grid to add new record, but it doesn’t seem to work. I want that the form should show the form fields from both the tables like above.
I am using grid like this.
[items]
widget:label = "Items"
transient=1
relationship=requisitionitems
widget:type=grid
widget:columns="pricePerUnit,unitCount,items"
order=10
group=Project

Kindly lead me, and tell me if this is possible with grid or let me know if there is any other method.
Your cooperation on the above will be much appreciated.

Thanks
muzafar
 
Posts: 44
Joined: Mon Nov 28, 2011 9:25 pm

Re: INSERT new record to the related table?

Postby shannah » Mon Jan 23, 2012 12:02 pm

I think you're on the right track with the grid widget. The layout won't be exactly what you specified but it will be functionally equivalent.

I need more details in order to assist you? E.g. what do you mean by "it doesn't work"? What does the form look like now? What specific things need to be changed? Have you specified a relationships.ini file - and if so what does it look like?
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 27 guests

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