Groups | Search | Server Info | Login | Register
Groups > comp.databases.filemaker > #3350
| Subject | ATTN Your Name, re:Re: Search & Replace |
|---|---|
| From | Nikki <nikki@thisp.com> |
| Newsgroups | comp.databases.filemaker |
| Message-ID | <170720210127591699%nikki@thisp.com> (permalink) |
| References | <4e3cdc19-d0e9-4c58-80d1-d80b1f9d5210@i28g2000prd.googlegroups.com> <1j1bjme.e5cchg17d94fwN%clk@tele2.ch> <h13ork$9pg$1@lust.ihug.co.nz> |
| Organization | Newshosting.com - Highest quality at a great price! www.newshosting.com |
| Date | 2021-07-17 01:27 +1000 |
In article <h13ork$9pg$1@lust.ihug.co.nz>, Your Name
<your.name@isp.com> wrote:
> "Christoph Kaufmann" <clk@tele2.ch> wrote in message
> news:1j1bjme.e5cchg17d94fwN%clk@tele2.ch...
> > G. Adriaan Barthol <gabarthol@gmail.com> wrote:
> >
> > > Mainly, I wish to generate two types of reports:
> > > 1 - Test report (where the "keyword" is replaced by underscores)
> > > e.g. Hier soir, l'OM a _____ le PSG. beaten
> > > 2 - Solution report (where the "keyword" is printed in an other colour
> > > in the sentence)
> > > e.g. Hier soir, l'OM a "battu" le PSG. beaten
> >
> > Make calculated fields for the test and for the solution sentences. Make
> > the calculation "text result" and explore the text functions.
> >
> > Text functions will allow you to calculate how many words are placed
> > before the keyword, and how many words are placed after the keyword.
> > Knowing that, you can build the test sentence.
> >
> > In order to avoid complicated functions (with functions inside
> > functions), you can use more calc fields or try the "let" function.
> >
> > Good luck.
>
> I don't know about changing the colour, but putting in the underscores is
> easy using the Substitute function in a Calculation field (no need for a
> Script).
> e.g.
> Test Sentence Calculation, Text Result, Unstored
> = Substitute(Sentence, Keyword, "____________")
>
> This will replace all occurences of the Keyword within the sentence with the
> underscores.
>
> If needed, you could use the Left function to replace the Keyword letters
> with the same number of underscore and space characters (to let people know
> how many letters the missing word has).
> e.g.
> Test Sentence Calculation, Text Result, Unstored
> = Substitute(Sentence, Keyword, Left("_ _ _ _ _ _ _ ",
> Length(Keyword) * 2 - 1))
>
> where the "_ _ _ _ _ " text contains enough underscore and space pairs to
> replace the longest possible Keyword.
>
Ha! Your Name, Your Advice has seeded the future!
Rather than simply ask a question I decided (being smart for once) to
do a search, and the answer I needed was right there (or here), thanks
to you. Perfect!
I salute you, long after the (original) event as it is.
Nikki
Back to comp.databases.filemaker | Previous | Next — Next in thread | Find similar
ATTN Your Name, re:Re: Search & Replace Nikki <nikki@thisp.com> - 2021-07-17 01:27 +1000 Re: ATTN Your Name, re:Re: Search & Replace Helpful Harry <HelpfulHarry@BusyWorking.com> - 2021-09-02 13:25 +1200
csiph-web