![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I have added a new field to an old DB (FM 8.5 adv. Win XP) and I would like to fill it up with a pre-specified text string ("Yes" as example), but I do not know how to use the Find/Replace function in Edit to do that. In practice, FM should detect if the field of that particula record is empty and replace a text string inside. Should I use a script with If/then loop ? Might you explain how to do that ?? Thanks a lot Diego |
#3
| |||
| |||
|
|
In article <1178247014.099546.180... (AT) h2g2000hsg (DOT) googlegroups.com>, Diego B <messa... (AT) yahoo (DOT) it> wrote: Hi, I have added a new field to an old DB (FM 8.5 adv. Win XP) and I would like to fill it up with a pre-specified text string ("Yes" as example), but I do not know how to use the Find/Replace function in Edit to do that. In practice, FM should detect if the field of that particula record is empty and replace a text string inside. Should I use a script with If/then loop ? Might you explain how to do that ?? Thanks a lot Diego You don't need the Find / Replace command. Assuming there even is that ability in newer versions of FileMaker, it will be for replacing one piece of text with another (just like a word processor), not an empty field. There are two ways you can do this though, and a looping script isn't needed. Both of these methods assume you already have the new field defined and that it currently doesn't have any data in it (or at least no data that is still wanted). ------------- Cut ----------- |
|
Helpful Harry Hopefully helping harassed humans happily handle handiwork hardships ;o) |
#4
| |||
| |||
|
|
On May 4, 1:27 am, Helpful Harry <helpful_ha... (AT) nom (DOT) de.plume.com wrote: In article <1178247014.099546.180... (AT) h2g2000hsg (DOT) googlegroups.com>, Diego B <messa... (AT) yahoo (DOT) it> wrote: Hi, I have added a new field to an old DB (FM 8.5 adv. Win XP) and I would like to fill it up with a pre-specified text string ("Yes" as example), but I do not know how to use the Find/Replace function in Edit to do that. In practice, FM should detect if the field of that particula record is empty and replace a text string inside. Should I use a script with If/then loop ? Might you explain how to do that ?? Thanks a lot Diego You don't need the Find / Replace command. Assuming there even is that ability in newer versions of FileMaker, it will be for replacing one piece of text with another (just like a word processor), not an empty field. There are two ways you can do this though, and a looping script isn't needed. Both of these methods assume you already have the new field defined and that it currently doesn't have any data in it (or at least no data that is still wanted). ------------- Cut ----------- All right ! First of all thank you for the quinck and complete reply. The problem is that I violated one of the two prerequisites to use your ways, that is the field has some values that I would like to keep. As I sayd there are records in which the filed is empty but there are others in which has a value different from "Yes" (as example "No"). I would like to keep all those values and replace only the empty records...is that still possible in your way, or should I go for a script ? Thank you again Diego |
#5
| |||
| |||
|
|
In this case the Calculation method won't work since that does change ALL records. Instead you can still use the Replace command which only works on the records in the Found Set: - First, make a BACKUP of the file just in case something goes wrong. (A step I missed out before, but one that should ALWAYS be done before making major changes to existing data / files.) - In Layout mode, put the field onto any layout using normal field formatting (or change the existing field to Normal formatting). - Next find the records where the field is empty: - Enter Find mode. - Type an = symbol into the field. - Perform the Find. - It is only these Found records that will be changed. - Then perform the Replace Command process without the Show All step: - Click in the new field and type in "Yes" (without the quote / speech marks) - do not exit the field, leave the text cursor in it. - Choose Replace from the Records menu. - In the window that appears, make *100%* sure that it says you are replacing the contents of the correct field with the "Yes" text, and then click on the Replace button. - All done. You can now remove the field from the layout if you don't want it there, or change it back to Radio Button, etc. |
|
Helpful Harry Hopefully helping harassed humans happily handle handiwork hardships ;o)- Hide quoted text - |
![]() |
| Thread Tools | |
| Display Modes | |
| |