Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.filemaker > #3352

Re: ATTN Your Name, re:Re: Search & Replace

From Helpful Harry <HelpfulHarry@BusyWorking.com>
Newsgroups comp.databases.filemaker
Subject Re: ATTN Your Name, re:Re: Search & Replace
Date 2021-09-02 13:25 +1200
Organization Aioe.org NNTP Server
Message-ID <sgp96h$1lpt$1@gioia.aioe.org> (permalink)
References <170720210127591699%nikki@thisp.com>

Show all headers | View raw


On 2021-07-16 15:27:59 +0000, Nikki said:
> 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

No idea when I posted that (must have been a long time ago because the 
ihug ISP ceased to exist in 2008), but glad it still helps.   :-)

BTW, the easiest way to change the colour of the answer would simply be 
to use a separated question and answer fields coloured appropriately 
and place on the layout where required. I should have thought of that 
very simple option originally.



Back to comp.databases.filemaker | Previous | NextPrevious in thread | Find similar


Thread

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