dbTalk Databases Forums  

Using same script with different tables

comp.databases.filemaker comp.databases.filemaker


Discuss Using same script with different tables in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Guy
 
Posts: n/a

Default Using same script with different tables - 06-26-2007 , 09:20 AM






8.5 Advanced WinXP

I have several tables with a common field (name)

I need to create a script that will find a name

The scripts steps are specific to the table (contact::name ;
schedule::name).

In a list view of all names, I make the name field a button and execute a
script. I'd like to have one script find the name via a button regardless
of table.

How?



--
-------------------------------------------------
Captain Guy
s/v Island Time (Beneteau 352#277)
AICW 845.5
386-689-5088



Reply With Quote
  #2  
Old   
Chris Brown
 
Posts: n/a

Default Re: Using same script with different tables - 06-26-2007 , 07:03 PM






Guy wrote:
Quote:
8.5 Advanced WinXP

I have several tables with a common field (name)

I need to create a script that will find a name

The scripts steps are specific to the table (contact::name ;
schedule::name).

In a list view of all names, I make the name field a button and execute a
script. I'd like to have one script find the name via a button regardless
of table.

How?



It is unclear quite how and why your find returns viewable results from
different layouts/tables. But assuming you are want to setup an export
or something...

you might try a conditional based on something like this skeleton:

find - name in different tables
If [ Get ( LayoutTableName ) = "TOC_A" ]
#do the particular find for A
Else If [ Get ( LayoutTableName ) = "TOC_B" ]
#do the particular find for B
Else If [ Get ( LayoutTableName ) = "TOC_C" ]
#do the particular find for C
End If


so on list of all names, one button, include go to layout in the
conditional sequence. But if you have gone to a specific layout, you
know the TOC anyway.

Do you mean you want the same button on different layouts, on the 'same'
(name) field? If so, use a script parameter attached to the button, and
a conditional if/else if to test the script paramater:


If [ Get ( ScriptParameter ) = "A" ]
#do A find
Else If [ Get ( ScriptParameter ) = "B" ]
#do B find
Else If [ Get ( ScriptParameter ) = "C" ]
#do C find
End If
#
Commit Records/Requests
[ Skip data entry validation; No dialog ]




regards

Chris


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.