Path: csiph.com!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!feeder1.feed.usenet.farm!feed.usenet.farm!peer02.ams4!peer.am4.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx36.iad.POSTED!not-for-mail Subject: ATTN Your Name, re:Re: Search & Replace From: Nikki Newsgroups: comp.databases.filemaker Reply-To: Nikki@thisp.com Message-ID: <170720210127591699%nikki@thisp.com> References: <4e3cdc19-d0e9-4c58-80d1-d80b1f9d5210@i28g2000prd.googlegroups.com> <1j1bjme.e5cchg17d94fwN%clk@tele2.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 8bit Mail-Copies-To: nobody User-Agent: Thoth/1.9.1 (Mac OS X) Lines: 57 X-Complaints-To: abuse(at)newshosting.com NNTP-Posting-Date: Fri, 16 Jul 2021 15:28:00 UTC Organization: Newshosting.com - Highest quality at a great price! www.newshosting.com Date: Sat, 17 Jul 2021 01:27:59 +1000 X-Received-Bytes: 3210 Xref: csiph.com comp.databases.filemaker:3350 In article , Your Name wrote: > "Christoph Kaufmann" wrote in message > news:1j1bjme.e5cchg17d94fwN%clk@tele2.ch... > > G. Adriaan Barthol 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