Great product!! I've learned a lot from the wiki and forums!!
I used http://xataface.com/wiki/relationship to model adding multiple allocations associated with the original transaction.
However, I have 2 issues I can't seem to fix.
1. Defining category.name as a "select" widget in it's fields.ini looks great on the transaction.new form,
(as a grid with a select widget) but on the category.new form it should still be a "text" widget.
2. I can't seem to stop it from adding new categories when it posts a transaction, even though catagory is just a lookup.
Basically, I want to add multiple allocations to a transaction using a select for the category names, while still being able to add new categories...
I hope I've been clear enough, as this concept may be useful to others. Thanks so much!! -Barry
here's the table structure/ relevant info. (i hope)
[category]
id
name
[transaction]
id
amount
etc.
[allocation]
catid
transid
amount
(transaction.relationships)
[Allocation]
allocations.catID = categories.CategoryId
allocations.transID = "$TransactionId"
(transaction.fields.ini)
[Allocations]
widget:label = "Category Allocations"
transient=1
order=5
relationship=Allocation
vocabulary = Categories
widget:type=grid
widget:columns="Name, amount"
(transaction.valuelists.ini)
[Categories]
__sql__ = "SELECT CategoryId, Name FROM categories ORDER BY Name"
(category.fields.ini)
[Name]
widget:label = "Name"
widget:type = select