f



Changing Text Field to ported field

I did a search, and maybe I'm looking things up using the wrong
criteria.  I apologize if this has been discussed before, and if it
has, please let me know where to find it.  Thanks.

FMPro V6.04
Windows XP

Our users are currently entering in all SW code associated with a
problem into a text field, using paragraph returns or comma's as
delimiters.

To make metric gathering more useful, I created a child database to
collect the SW mods individually (with all the details that go with
them), and have created portal on my main database to this child
database so that they can enter in the information.  No problem for
new records. The user will enter in their data regarding Software
Problem Issues, and when they get to the section to enter in SW mods
affected, all the information will be entered in the portal, and
stored in the SW_Mod_Child so that that information can be used for
other metric gathering purposes.

My problem... current records which already have all their mod's
entered into the one text field.  How do I extract them so that each
line in the text field will extract to a seperate file that can be
imported into my new child database as a seperate file.

EXAMPLE:
  Current setup
-----------------------------------------------------
Software Problem #:  123456
-----------------------------------------------------
Software Modules Affected (this is the text file):

Afile.txt <paragraph return>
bfile.a <paragraph return>
cfile.sh <paragraph return>
dfile.cur <paragraph return>
efile.dat <paragraph return>

----------------------------------------------------
****New Setup that I need: ********
----------------------------------------------------
Software Problem #: 123456
----------------------------------------------------
PORTAL - Software Modules Affected

Afile.txt  <in portal row>
bfile.a  <in portal row>
cfile.sh <in portal row>
dfile.cur  <in portal row>
efile.dat  <in portal row>

---------------------------------------------------
0
7/31/2008 2:58:31 PM
comp.databases.filemaker 11053 articles. 0 followers. amosw01 (46) is leader. Post Follow

2 Replies
572 Views

Similar Articles

[PageSpeed] 11

In article
<3e42b91f-a7af-4723-827b-ef6be820a4e5@25g2000hsx.googlegroups.com>,
"Teresa K." <teresa.kabourek@ngc.com> wrote:

> I did a search, and maybe I'm looking things up using the wrong
> criteria.  I apologize if this has been discussed before, and if it
> has, please let me know where to find it.  Thanks.
> 
> FMPro V6.04
> Windows XP
> 
> Our users are currently entering in all SW code associated with a
> problem into a text field, using paragraph returns or comma's as
> delimiters.
> 
> To make metric gathering more useful, I created a child database to
> collect the SW mods individually (with all the details that go with
> them), and have created portal on my main database to this child
> database so that they can enter in the information.  No problem for
> new records. The user will enter in their data regarding Software
> Problem Issues, and when they get to the section to enter in SW mods
> affected, all the information will be entered in the portal, and
> stored in the SW_Mod_Child so that that information can be used for
> other metric gathering purposes.
> 
> My problem... current records which already have all their mod's
> entered into the one text field.  How do I extract them so that each
> line in the text field will extract to a seperate file that can be
> imported into my new child database as a seperate file.
> 
> EXAMPLE:
>   Current setup
> -----------------------------------------------------
> Software Problem #:  123456
> -----------------------------------------------------
> Software Modules Affected (this is the text file):
> 
> Afile.txt <paragraph return>
> bfile.a <paragraph return>
> cfile.sh <paragraph return>
> dfile.cur <paragraph return>
> efile.dat <paragraph return>
> 
> ----------------------------------------------------
> ****New Setup that I need: ********
> ----------------------------------------------------
> Software Problem #: 123456
> ----------------------------------------------------
> PORTAL - Software Modules Affected
> 
> Afile.txt  <in portal row>
> bfile.a  <in portal row>
> cfile.sh <in portal row>
> dfile.cur  <in portal row>
> efile.dat  <in portal row>
> 
> ---------------------------------------------------

You could create a Script to do this, but since you are likely to only
need to do it once the easiest way will be to Export the current Text
field's data and then Import it back into the Child database, but it
will take a little manipulation along the way since FileMaker can't
export paragraph returns or tabs within record data.

First make a backup of the database file(s) just in case anything goes
wrong.

Next, create a new Calculation field that copies the data in the
current Text field, replacing the paragraph returns with something
else. This Calculation will also need to append the Software Problem ID
code so that the new Child records will still be linked to the original
Parent record.
eg.
     CalcField    Calculation, Text Result
         = Substitute(TextField, "{RET}", "*TAB*" & SoftwareID & "*-*") 
           & "*TAB*" & SoftwareID

where {RET} is the "backwards P" return character found on one of the
buttons in the Define Calculation window.

Now you can Find all the parent records and Export the them, making
sure to Export just this new CalcField by itself.

You should end up with a Text file that contains something like:

Afile.txt*TAB*123456*-*bfile.a*TAB*123456*-*cfile.sh*TAB*123456*-*dfile.
cur*TAB*123456*-*efile.dat*TAB*123456
FileB.dat*TAB*789001*-*ABCXYZ.doc*TAB*789001*-*Teddy.jpg*TAB*789001
etc.

Next you will need to open the exported text file into something like
Microsoft Word. Once the file has opened you can perform two Find &
Replace commands:

    Find *-* and replace with a paragraph return

    Find *TAB* and replace with a Tab

To obtain these two replacement characters, you can copy one before
performing the Find & Replace. For a paragraph return by selecting the
text after the last character in one line to just before the first
character in the next line. For a Tab, manually type a Tab and then
select the "gap".

Once Word has done these replacements you can Save As the file, making
sure the file format is "Text Only". This should give you a file that
looks something like:

Afile.txt     123456
bfile.a       123456
cfile.sh      123456
dfile.cur     123456
efile.dat     123456
FileB.dat     789001
ABCXYZ.doc    789001
Teddy.jpg     789001
etc.

This is one line for each new Child record, so back in FileMaker you
can Import this new text file back into the Child database file /
Table. Match the data with the appropriate fields (you can use the
Import Window to preview a few entries before performing the Import
itself).

If all goes well, the Portals in the Parent records shold now show the
new Child records. After checking to make sure, you can delete both the
original Text field and the CalcField.


Helpful Harry                   
Hopefully helping harassed humans happily handle handiwork hardships  ;o)
0
helpful_harry (1512)
8/2/2008 4:19:48 AM
Thanks Harry!   I'll be jumping on this today!

- Teresa

On Aug 1, 11:19=A0pm, Helpful Harry <helpful_ha...@nom.de.plume.com>
wrote:
> In article
> <3e42b91f-a7af-4723-827b-ef6be820a...@25g2000hsx.googlegroups.com>,
>
>
>
>
>
> "Teresa K." <teresa.kabou...@ngc.com> wrote:
> > I did a search, and maybe I'm looking things up using the wrong
> > criteria. =A0I apologize if this has been discussed before, and if it
> > has, please let me know where to find it. =A0Thanks.
>
> > FMPro V6.04
> > Windows XP
>
> > Our users are currently entering in all SW code associated with a
> > problem into a text field, using paragraph returns or comma's as
> > delimiters.
>
> > To make metric gathering more useful, I created a child database to
> > collect the SW mods individually (with all the details that go with
> > them), and have created portal on my main database to this child
> > database so that they can enter in the information. =A0No problem for
> > new records. The user will enter in their data regarding Software
> > Problem Issues, and when they get to the section to enter in SW mods
> > affected, all the information will be entered in the portal, and
> > stored in the SW_Mod_Child so that that information can be used for
> > other metric gathering purposes.
>
> > My problem... current records which already have all their mod's
> > entered into the one text field. =A0How do I extract them so that each
> > line in the text field will extract to a seperate file that can be
> > imported into my new child database as a seperate file.
>
> > EXAMPLE:
> > =A0 Current setup
> > -----------------------------------------------------
> > Software Problem #: =A0123456
> > -----------------------------------------------------
> > Software Modules Affected (this is the text file):
>
> > Afile.txt <paragraph return>
> > bfile.a <paragraph return>
> > cfile.sh <paragraph return>
> > dfile.cur <paragraph return>
> > efile.dat <paragraph return>
>
> > ----------------------------------------------------
> > ****New Setup that I need: ********
> > ----------------------------------------------------
> > Software Problem #: 123456
> > ----------------------------------------------------
> > PORTAL - Software Modules Affected
>
> > Afile.txt =A0<in portal row>
> > bfile.a =A0<in portal row>
> > cfile.sh <in portal row>
> > dfile.cur =A0<in portal row>
> > efile.dat =A0<in portal row>
>
> > ---------------------------------------------------
>
> You could create a Script to do this, but since you are likely to only
> need to do it once the easiest way will be to Export the current Text
> field's data and then Import it back into the Child database, but it
> will take a little manipulation along the way since FileMaker can't
> export paragraph returns or tabs within record data.
>
> First make a backup of the database file(s) just in case anything goes
> wrong.
>
> Next, create a new Calculation field that copies the data in the
> current Text field, replacing the paragraph returns with something
> else. This Calculation will also need to append the Software Problem ID
> code so that the new Child records will still be linked to the original
> Parent record.
> eg.
> =A0 =A0 =A0CalcField =A0 =A0Calculation, Text Result
> =A0 =A0 =A0 =A0 =A0=3D Substitute(TextField, "{RET}", "*TAB*" & SoftwareI=
D & "*-*")
> =A0 =A0 =A0 =A0 =A0 =A0& "*TAB*" & SoftwareID
>
> where {RET} is the "backwards P" return character found on one of the
> buttons in the Define Calculation window.
>
> Now you can Find all the parent records and Export the them, making
> sure to Export just this new CalcField by itself.
>
> You should end up with a Text file that contains something like:
>
> Afile.txt*TAB*123456*-*bfile.a*TAB*123456*-*cfile.sh*TAB*123456*-*dfile.
> cur*TAB*123456*-*efile.dat*TAB*123456
> FileB.dat*TAB*789001*-*ABCXYZ.doc*TAB*789001*-*Teddy.jpg*TAB*789001
> etc.
>
> Next you will need to open the exported text file into something like
> Microsoft Word. Once the file has opened you can perform two Find &
> Replace commands:
>
> =A0 =A0 Find *-* and replace with a paragraph return
>
> =A0 =A0 Find *TAB* and replace with a Tab
>
> To obtain these two replacement characters, you can copy one before
> performing the Find & Replace. For a paragraph return by selecting the
> text after the last character in one line to just before the first
> character in the next line. For a Tab, manually type a Tab and then
> select the "gap".
>
> Once Word has done these replacements you can Save As the file, making
> sure the file format is "Text Only". This should give you a file that
> looks something like:
>
> Afile.txt =A0 =A0 123456
> bfile.a =A0 =A0 =A0 123456
> cfile.sh =A0 =A0 =A0123456
> dfile.cur =A0 =A0 123456
> efile.dat =A0 =A0 123456
> FileB.dat =A0 =A0 789001
> ABCXYZ.doc =A0 =A0789001
> Teddy.jpg =A0 =A0 789001
> etc.
>
> This is one line for each new Child record, so back in FileMaker you
> can Import this new text file back into the Child database file /
> Table. Match the data with the appropriate fields (you can use the
> Import Window to preview a few entries before performing the Import
> itself).
>
> If all goes well, the Portals in the Parent records shold now show the
> new Child records. After checking to make sure, you can delete both the
> original Text field and the CalcField.
>
> Helpful Harry =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0
> Hopefully helping harassed humans happily handle handiwork hardships =A0;=
o)- Hide quoted text -
>
> - Show quoted text -

0
8/4/2008 3:16:54 PM
Reply: