Building data base aps with Rev (Jan Schenkel)

Jan Schenkel janschenkel at yahoo.com
Tue May 20 05:24:01 EDT 2003


--- Sadhunathan Nadesan <sadhu at castandcrew.com> wrote:
> | 
> | If you wanted to go the 'non-scripting way', I can
> | have a look at it tomorrow ; don't have my
> 'database'
> | computer with me this evening.
> | 
> 
> 	Yes, for sure, I'd be interested in that too.
> 
> 	Again, wow!  Many thanks.  I don't know about stuff
> like
> 	portal fields and custom props but you have given
> so many
> 	clues that, I am going to enjoy figuring it out.
> 
> 	Gee, this is really wonderful of you.  
> 
> 	Gratefully,
> 	Sadhu

Hi Sadhu,

As promised, I had a look at how to accomplish the
same thing without (too much) scripting. Here's what I
found:

- use the query builder to create the same query twice
(otherwise you get refresh issues) ; name them
PortalQuery and DetailQuery
  SELECT * FROM locations ;

- now create a new field and make it a table object ;
use the database panel to hook it up to the
PortalQuery and for columns pick "Show all"

- now create the other fields and uise the database
panel to hook them up to DetailQuery and pick the
separate columns.

- to round it all off, you'll want to update the
DetailQuery fields whenever you select a different
line in the PortalQuery table field ; so set its
script to (as usual, watch for wrappings):

  on selectionChanged
    put the hilitedLines of me into tNumber
    put the cREVDatabase["queryobject"] of fld
"DetailField1" into tObject
    put revQueryLongName(tObject) into tObject
    if exists(tObject) and the
cREVGeneral["databasequeryobject"] of tObject is true
then send "revGoToRecordOfQuery" && tObject & comma &
tNumber
  end selectionChanged

- of course you'll have to employ in your PortalQuery
field the tricks I mentioned earlier to get the
arrowKeys, etc.

Hope this helped,

Jan Schenkel.

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com



More information about the use-livecode mailing list