Building data base aps with Rev (Jan Schenkel)

Sadhunathan Nadesan sadhu at castandcrew.com
Sun May 18 18:48:02 EDT 2003


Jan,

As someone else said, way kewl.

Thank you!


Now, since you are being so extremely helpful, can we prevail on you to
help us get to the next step?  A multi-record type form.


Typical of course is a master-detail form with a one to many relationship.

For example I want to build a phone number data base with 2 tables.
One table for company name, address, some other fixed stuff, as the parent
record, and then a child record with various people at that address.
This 2nd table would have as its foreign key the primary key of the first
table, and then fields like name, title, phone number, fax, email, etc.

The reason being we would typically have many different contacts at
the same customer, for different stuff (accounts receivable, technical
contact, payroll coordinator, etc.)  Nice to group them in this way.
By customer.

So, easy enough using your helpful examples to make a card with the
company info at the top, then what would be nice is a 'table' field at
the bottom, for the child record, with each column in the table being a
data base column, so the user could scroll through the list of contacts
at that company on one screen.

Any hints on if that is possible, and if so how to go about it?

And pardon me for taking advantage of your generosity.

Regards,
Sadhu




| Hmm, appearently my brain was still partially on
| holiday, so let me correct the above:
| 
|   if tCursor is not a number then answer tCursor
|   else
|     repeat with i = 1 to
| revDatabaseColumnCount(tCursor)
|       put revDatabaseColumnNumbered(tCursor,i) into
| field i
|     end repeat
|   end if
| 
| --- and ---
| 
|     put revDatabaseColumnNames(tCursor) into \
|         tColumnNames
|     repeat for each item tColumnName in tColumnNames
|       if there is a field tColumnName then put \
|          revDatabaseColumnNamed(tCursor, tColumnName)
| \
|          into field tColumnName
|     end repeat
| 
| Sorry about any confusion I may have caused.
| 
| Jan Schenkel.



More information about the use-livecode mailing list