dbTalk Databases Forums  

extract info from fields

comp.databases.filemaker comp.databases.filemaker


Discuss extract info from fields in the comp.databases.filemaker forum.



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

Default extract info from fields - 06-14-2005 , 02:17 PM






is there a way to extract information from a field and use it in a
calulation/script. for example i would like to be able to click on a
field and use the number that was inside the field at the time to open
that particular record number. is there some Get funtion or evaluate
fuction that will do the job? TIA


Reply With Quote
  #2  
Old   
audleman@quasika.net
 
Posts: n/a

Default Re: extract info from fields - 06-14-2005 , 03:02 PM






You'll want to use the 'Go To Related Record' script step for that
purpose.

In layout mode, right click on the field and select 'Specify Button'.
Select the aforementioned script step.

You can use this on any related field from another record -- not just
the record ID in your example. For example, you can display 'User Name'
from the related record and FM is smart enough to be able to find the
related record.

Kevin


Reply With Quote
  #3  
Old   
Matt Wills
 
Posts: n/a

Default Re: extract info from fields - 06-14-2005 , 03:42 PM



Assuming FM7.

See Get(ScriptParameter) in Help.

Specify the contents of your field as the parameter (in the Specify Button
dialog), and set your Go To Record script step to the calculation
Get(ScriptParameter).

However...

Consider how you populate the value in the record number field: Go To
Record (whatever value) will go to a record at that position in the
current found set. That record's position/number changes, depending on how
many records there are in the set and how they are sorted.

You'll probably want to do something a little more permanent, such as a
field to hold a unique record identifier (perhaps Get(RecordID) on
creation), then set a self-join relationship so you can go to that related
record using the method described above.

Matt

On 6/14/2005, pri wrote:

Quote:
is there a way to extract information from a field and use it in a
calulation/script. for example i would like to be able to click on a
field and use the number that was inside the field at the time to open
that particular record number. is there some Get funtion or evaluate
fuction that will do the job? TIA

Reply With Quote
  #4  
Old   
Matt Wills
 
Posts: n/a

Default Re: extract info from fields - 06-14-2005 , 03:47 PM



Scratch from last paragraph in pervious message.

On 6/14/2005, Matt Wills wrote:

Quote:
using the method described above

Reply With Quote
  #5  
Old   
Helpful Harry
 
Posts: n/a

Default Re: extract info from fields - 06-15-2005 , 01:33 AM



In article <1118776659.178992.285330 (AT) g14g2000cwa (DOT) googlegroups.com>,
"pri" <priyankc (AT) gmail (DOT) com> wrote:

Quote:
is there a way to extract information from a field and use it in a
calulation/script. for example i would like to be able to click on a
field and use the number that was inside the field at the time to open
that particular record number. is there some Get funtion or evaluate
fuction that will do the job? TIA
If there's only one field running the script, it's a simple matter of
accessing that field.
ie.
Go To Record [FieldName]


If you've defined multiple different fields to be buttons, then the
easiest solution is the one from the "Refer to fields anonymously"
topic. This would be to have a separate script for each button - but to
save the necessity of making the same change to 20 different scripts
whenever you find a mistake or want it to do something different /
additional, what you can do is use a "stub script" for each field /
button that stores that field's value in a Global field and then runs
one main script.
ie.
Script for field / button #1
Set Field [Global, Field1]
Perform Script [MainScript]


Script for field / button #2
Set Field [Global, Field2]
Perform Script [MainScript]


etc.

Where MainScript uses the command:

Go To Record [Global]


Depending on what those fields are actually for, a better solution
might be to spend the time now correcting the database design so that
all the fields are the same one instead of multiple fields - it could
save a lot of hassle later.



Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)


Reply With Quote
  #6  
Old   
pri
 
Posts: n/a

Default Re: extract info from fields - 06-15-2005 , 08:51 AM



Harry, what exactly i have is a layout with information about family
members. I have it being shown as a family tree with a particular
record showing the person's parents and grandparents. So, i have used
portals to show the information of each family member (ie name, dob,
age, sex, alog with a unique ID). Now what i want to do is if i click
on one's grandfather, i want to go the grandfather record in the same
layout and see his father, mother, and grand parents. Right now, what i
do is have separate script on each person's ID. thus, i have to refer
to a different field in each script, which are basically the same but
refer to a different field because they are in a portal. Now is there a
way to just click on ANY ID and be able to pull up that person's family
history? hope i have explained it clearly. thanks for the help, Helpful
Harry and everyone else.


Reply With Quote
  #7  
Old   
Helpful Harry
 
Posts: n/a

Default Re: extract info from fields - 06-16-2005 , 01:45 AM



In article <1118843491.203057.172440 (AT) o13g2000cwo (DOT) googlegroups.com>,
"pri" <priyankc (AT) gmail (DOT) com> wrote:

Quote:
Harry, what exactly i have is a layout with information about family
members. I have it being shown as a family tree with a particular
record showing the person's parents and grandparents. So, i have used
portals to show the information of each family member (ie name, dob,
age, sex, alog with a unique ID). Now what i want to do is if i click
on one's grandfather, i want to go the grandfather record in the same
layout and see his father, mother, and grand parents. Right now, what i
do is have separate script on each person's ID. thus, i have to refer
to a different field in each script, which are basically the same but
refer to a different field because they are in a portal. Now is there a
way to just click on ANY ID and be able to pull up that person's family
history? hope i have explained it clearly. thanks for the help, Helpful
Harry and everyone else.
I don't quite understand if you've got one portal for all related
people,
eg.
Mother Name m/d/y ID
Father Name m/d/y ID
etc.

or a set of portals with only one related person's details.


If there's only one portal, then it's simply a matter of putting a
button in the portal row which doesn't even need to run a script, but
instead just performs the command:

Go To Related Record [Show only related]

You only need to put one button in the top portal row when in Layout
Mode and it will automatically replicate with each row that has data
(plus the blank row if the portal is allowing creation of records).



If you've got multiple portals, then there's no way you can know the
field, so you have to have a separate script for each clickable
"button".

You can change to the clicked person's record by using the relationship
that is defined for that portal.
ie.
Script for Grandfather button
Go To Related Record [Show only related, GrandfatherRelationship]


Script for Mother button
Go To Related Record [Show only related, MotherRelationship]


etc.

Since there's only ever one person to a portal / relationship it should
be fine.


Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)


Reply With Quote
  #8  
Old   
pri
 
Posts: n/a

Default Re: extract info from fields - 06-16-2005 , 08:50 AM



thanks for the help. i do have the second case, where i have one
person's info per portal. thus i would end up having to make separte
buttons. darn!


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.