Populate a layout with a "found" record
I would like to offer the user a portal (I assume) to find a last
name, first name and populate a layout with the selected record(s).
The portal would be based on the same table as the layout.
I assume that I can use Get(RecordID) calculation from that portal but
am lost about how to do a Find or a GoToRecord using that ID.
This concept seems easier than making a user go into find mode, and is
a concaept used in Microsoft Access.
Or perhaps there are better ideas...?
Many thanks.
btw Version 7.0....
Ron
Re: Populate a layout with a "found" record
"Ron" <rcarr38 [at] comcast.net> schreef in bericht
news:1185115702.111171.35930 [at] r34g2000hsd.googlegroups.com...
>I would like to offer the user a portal (I assume) to find a last
> name, first name and populate a layout with the selected record(s).
> The portal would be based on the same table as the layout.
> I assume that I can use Get(RecordID) calculation from that portal but
> am lost about how to do a Find or a GoToRecord using that ID.
> This concept seems easier than making a user go into find mode, and is
> a concaept used in Microsoft Access.
> Or perhaps there are better ideas...?
>
> Many thanks.
> btw Version 7.0....
> Ron
>
Are you looking for the Go to Related Record script function? (see the
helpfile)
Or are you trying to fill in the fields of a new record?
Keep well, Ursus
Re: Populate a layout with a "found" record
On Jul 22, 1:30 pm, "Ursus" <ursus.k... [at] wanadoo.nl> wrote:
> "Ron" <rcar... [at] comcast.net> schreef in berichtnews:1185115702.111171.35930 [at] r34g2000hsd.googlegroups .com...
>
> >I would like to offer the user a portal (I assume) to find a last
> > name, first name and populate a layout with the selected record(s).
> > The portal would be based on the same table as the layout.
> > I assume that I can use Get(RecordID) calculation from that portal but
> > am lost about how to do a Find or a GoToRecord using that ID.
> > This concept seems easier than making a user go into find mode, and is
> > a concaept used in Microsoft Access.
> > Or perhaps there are better ideas...?
>
> > Many thanks.
> > btw Version 7.0....
> > Ron
>
> Are you looking for the Go to Related Record script function? (see the
> helpfile)
>
> Or are you trying to fill in the fields of a new record?
>
> Keep well, Ursus
The portal would contain the first name, last name, recordid of all of
the records in Table A.
When the user selects one of them, the layout upon which the portal
resides would be populated by the full record in Table A. If the name
were not found, then the layout would go into New Record mode.
Given that;
Get(REcordID) calculation gets me the record id of the record.
GoToRelatedRecord.....if this is in a script attached to the Portal,
all it does is move the Portal record.
I wondered if the Portal script could set a global, then GoTo the
layout which has a script that looks for the recordID in the
global...?
I just am not seeing how the steps might tie together.
Ron
Re: Populate a layout with a "found" record
>>
>> Are you looking for the Go to Related Record script function? (see the
>> helpfile)
>>
>> Or are you trying to fill in the fields of a new record?
>>
>> Keep well, Ursus
>
> The portal would contain the first name, last name, recordid of all of
> the records in Table A.
> When the user selects one of them, the layout upon which the portal
> resides would be populated by the full record in Table A. If the name
> were not found, then the layout would go into New Record mode.
>
> Given that;
> Get(REcordID) calculation gets me the record id of the record.
> GoToRelatedRecord.....if this is in a script attached to the Portal,
> all it does is move the Portal record.
> I wondered if the Portal script could set a global, then GoTo the
> layout which has a script that looks for the recordID in the
> global...?
> I just am not seeing how the steps might tie together.
>
>
>
> Ron
>
Something like this in a scipt
gSearchRecordID is a global that holds the ID that you are searching
Set Variable ( $ID ; ThisTable::gSearchREcordID)
//Stores the value for the duration of the script
IF isvalid ( MyRelatedTabel::gSearchREcordID)
//There already exist a related record
Goto Related Record [From Table:"MyRelatedTable"; Using Layout: "Input"
(MyRelatedTable)]
//So we want to go there
Else
//There is no related record
Goto layout ["Input" (MyRelatedTable)]
//So we plainly go to the input layout
New Record/Request
//create a new record
Set Field [MyRelatedTable::MyRelatedID ; $ID]
// and put the stored value into the ID field
End IF
//end of scipt
Put one button inside the top row of your portal that fires this script
Hope that helps.
Re: Populate a layout with a "found" record
On Jul 23, 1:24 pm, "Ursus" <ursus.k... [at] wanadoo.nl> wrote:
> >> Are you looking for the Go to Related Record script function? (see the
> >> helpfile)
>
> >> Or are you trying to fill in the fields of a new record?
>
> >> Keep well, Ursus
>
> > The portal would contain the first name, last name, recordid of all of
> > the records in Table A.
> > When the user selects one of them, the layout upon which the portal
> > resides would be populated by the full record in Table A. If the name
> > were not found, then the layout would go into New Record mode.
>
> > Given that;
> > Get(REcordID) calculation gets me the record id of the record.
> > GoToRelatedRecord.....if this is in a script attached to the Portal,
> > all it does is move the Portal record.
> > I wondered if the Portal script could set a global, then GoTo the
> > layout which has a script that looks for the recordID in the
> > global...?
> > I just am not seeing how the steps might tie together.
>
> > Ron
>
> Something like this in a scipt
>
> gSearchRecordID is a global that holds the ID that you are searching
>
> Set Variable ( $ID ; ThisTable::gSearchREcordID)
> //Stores the value for the duration of the script
> IF isvalid ( MyRelatedTabel::gSearchREcordID)
> //There already exist a related record
> Goto Related Record [From Table:"MyRelatedTable"; Using Layout: "Input"
> (MyRelatedTable)]
> //So we want to go there
> Else
> //There is no related record
> Goto layout ["Input" (MyRelatedTable)]
> //So we plainly go to the input layout
> New Record/Request
> //create a new record
> Set Field [MyRelatedTable::MyRelatedID ; $ID]
> // and put the stored value into the ID field
> End IF
> //end of scipt
>
> Put one button inside the top row of your portal that fires this script
>
> Hope that helps.- Hide quoted text -
>
> - Show quoted text -
Got it.
many thanks!
Ron
Re: Populate a layout with a "found" record
On Jul 23, 1:24 pm, "Ursus" <ursus.k... [at] wanadoo.nl> wrote:
> >> Are you looking for the Go to Related Record script function? (see the
> >> helpfile)
>
> >> Or are you trying to fill in the fields of a new record?
>
> >> Keep well, Ursus
>
> > The portal would contain the first name, last name, recordid of all of
> > the records in Table A.
> > When the user selects one of them, the layout upon which the portal
> > resides would be populated by the full record in Table A. If the name
> > were not found, then the layout would go into New Record mode.
>
> > Given that;
> > Get(REcordID) calculation gets me the record id of the record.
> > GoToRelatedRecord.....if this is in a script attached to the Portal,
> > all it does is move the Portal record.
> > I wondered if the Portal script could set a global, then GoTo the
> > layout which has a script that looks for the recordID in the
> > global...?
> > I just am not seeing how the steps might tie together.
>
> > Ron
>
> Something like this in a scipt
>
> gSearchRecordID is a global that holds the ID that you are searching
>
> Set Variable ( $ID ; ThisTable::gSearchREcordID)
> //Stores the value for the duration of the script
> IF isvalid ( MyRelatedTabel::gSearchREcordID)
> //There already exist a related record
> Goto Related Record [From Table:"MyRelatedTable"; Using Layout: "Input"
> (MyRelatedTable)]
> //So we want to go there
> Else
> //There is no related record
> Goto layout ["Input" (MyRelatedTable)]
> //So we plainly go to the input layout
> New Record/Request
> //create a new record
> Set Field [MyRelatedTable::MyRelatedID ; $ID]
> // and put the stored value into the ID field
> End IF
> //end of scipt
>
> Put one button inside the top row of your portal that fires this script
>
> Hope that helps.- Hide quoted text -
>
> - Show quoted text -
I have spent a couple of hours trying to find out how to set a global
variable...or any variable.
Set Variable ( $ID ; ThisTable::gSearchREcordID) is not an available
option: keep in mind I am using version 7 - the non-profit I am
working with can't upgrade and I believe 8.5 requires OS 10, while
they have OS 9.
I expect I'm missing something basic, but I have spent a long time
with the book!
Any help?
Thanks
Re: Populate a layout with a "found" record
> [...]option: keep in mind I am using version 7 - the non-profit I am
> working with can't upgrade and I believe 8.5 requires OS 10, while
> they have OS 9.
> I expect I'm missing something basic, but I have spent a long time
> with the book!
OS 9 and FM 7 are not working. Maximum is FM 6.
Jens
--
A: Because it fouls the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
Re: Populate a layout with a "found" record
> I have spent a couple of hours trying to find out how to set a global
> variable...or any variable.
> Set Variable ( $ID ; ThisTable::gSearchREcordID) is not an available
> option: keep in mind I am using version 7 - the non-profit I am
> working with can't upgrade and I believe 8.5 requires OS 10, while
> they have OS 9.
> I expect I'm missing something basic, but I have spent a long time
> with the book!
> Any help?
>
> Thanks
>
>
Instead of a variable (missed your version....) you can create a global
field of the right kind and store the value there.
Keep well, Ursus
Re: Populate a layout with a "found" record
<snip>
>
> the non-profit I am working with can't upgrade and I believe 8.5 requires
> OS 10, while they have OS 9.
>
<snip>
If they are a proper non-profit organisation then they will probably
qualify for "Educational" pricing from both Apple and FileMaker Inc
(and many other places). Although still fairly expensive, it's worth
looking into if they don't already know about it.
Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)