auto-complete fields

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

auto-complete fields

Postby butchseaman » Thu Feb 11, 2010 12:14 pm

I have two tables I am working with.
client_info
policy_information

I select a record in client_info and it list the associated records when in detail view.
I select one of the associated records and it gives me associated information.

What I want is to have a name field auto populate from the client_info in the associated record when viewing.

Not sure if this makes sense ...

not sure how to get this done....

Thanks in advance for your advice
butchseaman
 
Posts: 21
Joined: Sat Jan 23, 2010 8:51 am

Re: auto-complete fields

Postby shannah » Thu Feb 11, 2010 3:12 pm

There are a few ways to accomplish this.

1. Use a vocabulary on the client_info_id field so that it is displayed as something more human readable in the interface when it is displayed.

2. Use the __sql__ directive to "graft" some fields onto the end of the associated_records table.
e.g.
in the fields.ini file for the associated_records table.
Code: Select all
__sql__ = "select a.*, c.client_name from associated_records a left join client_info c on a.client_info_id=c.client_info_id"



3. Implement the fieldname__display() for a field to be more descriptive (loading info about the client_info from the database).

-Steve
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 16 guests

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