(?) Saving Calc data to another database

(?) Saving Calc data to another database

am 26.12.2007 08:31:00 von DD

I have been building a MySpace "friends" following, and I use a FMP (7)
database to trim out each person's unique MySpace ID number for a
variety of ULR combinations for communication.

I would like to start storing the data I discover in another, related
file but cannot figure out how to do it, and I know it must be simple.

I bcasically want to save the MS ID$# in one field, which I determine
via a calculation that strips it out of a URL. In most cases I know a
first name, so I would like to add that to a filed in database 1 but
then amek sure database 2 stores an onging collection of IDs and name
data.

How do I make database 2 create/store a new record and grab what's
currently displayed in database1 which did the trimming?

Re: (?) Saving Calc data to another database

am 27.12.2007 02:26:42 von Helpful Harry

In article <2007122523310016807%paint4life@pacbellnet>, DD
wrote:

> I have been building a MySpace "friends" following, and I use a FMP (7)
> database to trim out each person's unique MySpace ID number for a
> variety of ULR combinations for communication.
>
> I would like to start storing the data I discover in another, related
> file but cannot figure out how to do it, and I know it must be simple.
>
> I bcasically want to save the MS ID$# in one field, which I determine
> via a calculation that strips it out of a URL. In most cases I know a
> first name, so I would like to add that to a filed in database 1 but
> then amek sure database 2 stores an onging collection of IDs and name
> data.
>
> How do I make database 2 create/store a new record and grab what's
> currently displayed in database1 which did the trimming?

The best way would be to use a script - once "Database1" has the
correct data you can click on a button that runs a script to create the
new record in "Database2" and transfer the data value across.

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

Re: (?) Saving Calc data to another database

am 02.01.2008 07:46:45 von DD

On 2007-12-26 17:26:42 -0800, Helpful Harry
said:

> The best way would be to use a script - once "Database1" has the
> correct data you can click on a button that runs a script to create the
> new record in "Database2" and transfer the data value across.
>
> Helpful Harry Hopefully helping harassed humans
> happily handle handiwork hardships ;o)

Thank you again, Harry... alway you answering me. I appreciate it.

When you say transfer, would the script have indivdual step for each
field of data?

Am I correct that I want to COPY field Name from Database 1 and Paste
to field Name in Database 2?

So there's no point in Relating the two databases? I thought if they
were related, the new data would somhow be automatiacally recorded in
both...

Re: (?) Saving Calc data to another database

am 02.01.2008 09:05:10 von Lynn Allen

On 2008-01-01 22:46:45 -0800, DD said:

> On 2007-12-26 17:26:42 -0800, Helpful Harry
> said:
>
>> The best way would be to use a script - once "Database1" has the
>> correct data you can click on a button that runs a script to create the
>> new record in "Database2" and transfer the data value across.
>>
>> Helpful Harry Hopefully helping harassed humans
>> happily handle handiwork hardships ;o)
>
> Thank you again, Harry... alway you answering me. I appreciate it.
>
> When you say transfer, would the script have indivdual step for each
> field of data?
>
> Am I correct that I want to COPY field Name from Database 1 and Paste
> to field Name in Database 2?
>
> So there's no point in Relating the two databases? I thought if they
> were related, the new data would somhow be automatiacally recorded in
> both...

There are many ways to get data from one file to another.

1. Have a found set in FileA, and do an import of that data into FileB
2. Push the data from FileA to FileB through a relationship that allows
creation of records. Use Set Field for this, do not under any
circumstances use Copy/Paste as that disrupts the user's clipboard.
3. Set global fields in FileA or a third file, then go to FileB and
draw the data out of those global fields. In FM7+, relationships are no
longer required for accessing and using global fields anywhere in the
solution.
4. Create a text export file from FileA, then import that text file into FileB
5. Set up FileA as an ODBC data source, and pull the data out that way

As you can see, these many methods can be appropriate in different
circumstances, and we can't know what specifically will be easiest and
most efficient for you. I suspect #2 might be best, but I can't really
say.

However, the framing of your question tells me that you're right at the
beginning of your use of Filemaker and relationships as they operate in
FM. I think you might benefit from some reading of third party
documentation on how to set up relationships and what they can or
cannot do. A relationship does not create records automatically, you
have to do that programmatically through scripting. I'm pretty sure
that's what Harry meant.
--
Lynn Allen
--
www.semiotics.com
Member Filemaker Business Alliance
Long Beach, CA

Re: (?) Saving Calc data to another database

am 02.01.2008 09:08:21 von Lynn Allen

On 2008-01-02 00:05:10 -0800, Lynn Allen said:

> I think you might benefit from some reading of third party
> documentation on how to set up relationships and what they can or
> cannot do.

Sorry, I meant to include a reference to a good book on FM design.

I've always liked this series:

http://www.amazon.com/Special-Using-FileMaker/dp/078973723X/ ref=sr_1_1?ie=UTF8&s=books&qid=1199261215&sr=8-1

This

might also give you a nudge, though it's more advanced:

http://www.amazon.com/FileMaker-Developer-Reference-Function s-Extensive/dp/0789737086/ref=sr_1_12?ie=UTF8&s=books&qid=11 99261239&sr=8-12
--


Lynn Allen
--
www.semiotics.com
Member Filemaker Business Alliance
Long Beach, CA

Re: (?) Saving Calc data to another database

am 03.01.2008 01:27:11 von Helpful Harry

In article <2008010122464516807%paint4life@pacbellnet>, DD
wrote:

> On 2007-12-26 17:26:42 -0800, Helpful Harry
> said:
>
> > The best way would be to use a script - once "Database1" has the
> > correct data you can click on a button that runs a script to create the
> > new record in "Database2" and transfer the data value across.
> >
> > Helpful Harry Hopefully helping harassed humans
> > happily handle handiwork hardships ;o)
>
> Thank you again, Harry... alway you answering me. I appreciate it.
>
> When you say transfer, would the script have indivdual step for each
> field of data?
>
> Am I correct that I want to COPY field Name from Database 1 and Paste
> to field Name in Database 2?
>
> So there's no point in Relating the two databases? I thought if they
> were related, the new data would somhow be automatiacally recorded in
> both...

You should NEVER use the Copy and Paste script commands (unless it's a
database that only you ever use yourself). The Copy command will copy
the data from the field and in doing so replaces whatever the user may
have had on the system's clipboard, which they may well still want.

Technically you could first temporarily Paste the clipboard's existing
data into a Global field, then use Copy and Paste to move your data,
before finally using Copy again to replace the original data ... BUT
you would never know what type of data the user has on their clipboard:
text, image, sound, etc.

Instead of Copy / Paste, you should always use the Set Field command to
move data from field to field via a script.


A Relationship doesn't automatically make related records appear. A
Relationship simply groups together the related records, so you would
still need to script the creation of the new related records (the
easiest way is via a Portal).

As Lynn (I think) said, in this case it's probably easiest to just
import the wanted data from the "parsing" Database1 into the "real"
Database2. You can then delete the records from the "parsing" Database1
since they're no longer needed (unless there's something else you use
them for).

In older versions of FileMaker this would need two scripts:

Database1_ExportScript
Show All Records
Perform Script [Database2_ImportScript]
Delete All Records [No Dialog]

Database2_ImportScript
Import Records [Restore]

In newer versions of FileMaker you can probably combine these into one
script (assuming both tables are in the same database file), but would
have to change the which table is the focus of the commands before
importing the new data.

In both cases you would need to manually perform the Import so that you
can set the field order, etc. stored with the script for the "Restore"
part of the function properly.

- Performing the Import manually.

- Go back into the Database2_ImportScript and then close it again.

- FileMaker should ask if you want to replace various stored
options, so make sure it says to Replace the stored Import.
FileMaker will then store the new manual version to use
whenever the script is run.

Just make sure not to Replace the Import whenever later editing the
script (unless of course you want to modify the stored Import again,
eg. new fields to be imported are added).


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

Re: (?) Saving Calc data to another database

am 03.01.2008 06:21:42 von Lynn Allen

On 2008-01-02 16:27:11 -0800, Helpful Harry
said:

> In both cases you would need to manually perform the Import so that you
> can set the field order, etc. stored with the script for the "Restore"
> part of the function properly.
>
> - Performing the Import manually.

Harry, you really need to get a current version of FM.

In versions 7 and up, import order, export order, sort order and find
criteria, which used to be of the "teach and record" method, are now
set explicitly in the script steps. They can be edited at will without
reperforming the actions.

--
Lynn Allen
--
www.semiotics.com
Member Filemaker Business Alliance
Long Beach, CA

Re: (?) Saving Calc data to another database

am 03.01.2008 06:45:51 von Helpful Harry

In article <477c70e6@news.bnb-lp.com>, Lynn Allen
wrote:

> On 2008-01-02 16:27:11 -0800, Helpful Harry
> said:
>
> > In both cases you would need to manually perform the Import so that you
> > can set the field order, etc. stored with the script for the "Restore"
> > part of the function properly.
> >
> > - Performing the Import manually.
>
> Harry, you really need to get a current version of FM.

No problem ... after you buy me the new Mac to run it on ... and then
that will need a new printer and a new scanner because my current ones
use the old connection plugs, and all the other software would need to
be updated too. ;o)


> In versions 7 and up, import order, export order, sort order and find
> criteria, which used to be of the "teach and record" method, are now
> set explicitly in the script steps. They can be edited at will without
> reperforming the actions.

I did know that, although I had forgotten when posting the reply. I
also assumed that the old ways still work as well, but of course they
may not do for everything.

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

Re: (?) Saving Calc data to another database

am 03.01.2008 08:21:21 von Lynn Allen

On 2008-01-02 21:45:51 -0800, Helpful Harry
said:

> I did know that, although I had forgotten when posting the reply. I
> also assumed that the old ways still work as well, but of course they
> may not do for everything.

Nope, they do not work anymore. It's the new way only.
--
Lynn Allen
--
www.semiotics.com
Member Filemaker Business Alliance
Long Beach, CA

Re: (?) Saving Calc data to another database

am 07.01.2008 01:24:33 von DD

On 2008-01-02 00:05:10 -0800, Lynn Allen said:

> 2. Push the data from FileA to FileB through a relationship that allows
> creation of records. Use Set Field for this, do not under any
> circumstances use Copy/Paste as that disrupts the user's clipboard.

Push?

How do I make a relationship "that allows careation of records"? Shall
I use a Script step "New record?"

> 3. Set global fields in FileA or a third file, then go to FileB and
> draw the data out of those global fields. In FM7+, relationships are no
> longer required for accessing and using global fields anywhere in the
> solution.

"Draw the data out"?

I must boing something wrong...

I have a 2nd database file (File 2)
It has 2 fields, both are text

There are no records in it. (Except an empty #1)

In File 2 I cateated a Script that;
1. Set Field [File 1::Field One; File 2:: Field One] (they are each
text, though F1 of File 1 is a calc result)
2. Set Field [File 1::Field One; File 2:: Field two]
Both files are shown in the Relationships Pane of each file... there
are no connections drawn.

Now, I am expecting that this will transfer the 2 fields' data over
from File 1 to File 2.

What's wrong?

Re: (?) Saving Calc data to another database

am 07.01.2008 06:10:03 von Helpful Harry

In article <2008010616243216807%paint4life@pacbellnet>, DD
wrote:

> On 2008-01-02 00:05:10 -0800, Lynn Allen said:
>
> > 2. Push the data from FileA to FileB through a relationship that allows
> > creation of records. Use Set Field for this, do not under any
> > circumstances use Copy/Paste as that disrupts the user's clipboard.
>
> Push?
>
> How do I make a relationship "that allows careation of records"? Shall
> I use a Script step "New record?"
>
> > 3. Set global fields in FileA or a third file, then go to FileB and
> > draw the data out of those global fields. In FM7+, relationships are no
> > longer required for accessing and using global fields anywhere in the
> > solution.
>
> "Draw the data out"?
>
> I must boing something wrong...
>
> I have a 2nd database file (File 2)
> It has 2 fields, both are text
>
> There are no records in it. (Except an empty #1)
>
> In File 2 I cateated a Script that;
> 1. Set Field [File 1::Field One; File 2:: Field One] (they are each
> text, though F1 of File 1 is a calc result)
> 2. Set Field [File 1::Field One; File 2:: Field two]
> Both files are shown in the Relationships Pane of each file... there
> are no connections drawn.
>
> Now, I am expecting that this will transfer the 2 fields' data over
> from File 1 to File 2.
>
> What's wrong?

Having a Relationship wil not create new records magically. You still
have to create the records in the appropriate tables / files and
provide the data to make the Relationship link valid ... but before
that you'll first need to deine the Relationship that links a field in
"File 1" to a field in "File 2".

I think you're heading in the wrong direction trying to use the
Relationship link. The easier / better method is to be in "File 2" and
use the Import command to "pull in" the data from "File 1".




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

Re: (?) Saving Calc data to another database

am 25.01.2008 09:46:59 von DD

On 2008-01-06 21:10:03 -0800, Helpful Harry
said:

> I think you're heading in the wrong direction trying to use the
> Relationship link. The easier / better method is to be in "File 2" and
> use the Import command to "pull in" the data from "File 1".

Thanks. That does help