[OT] Need a simple FileMaker script

Geoff Canyon gcanyon at gmail.com
Thu Aug 1 22:01:12 EDT 2013


You don't need a script for this unless you want to do it repeatedly, say
for different sets of data or whatever. If you just want to do this right
now for whatever set of records you're looking at:

1. Find the records you want to update. If all of them, then Show All
Records on the Records menu.
2. Click in the field you want to update (in your case A6). It doesn't
matter which record you're in.
3. Select Replace Field Contents... on the Records menu.
4. In the dialog, click the radio button next to Replace with calculated
result: (or click the Specify button next to it)
5. In the Specify Calculation dialog, paste this text into the calculation
entry field (big white box at the bottom):

Left ( LeftWords ( source ; 1 ) ; 5 ) & Left ( MiddleWords ( source ; 2 ; 1
) ; 5) & Left ( MiddleWords ( source ; 3 ; 1 ) ; 5)

This assumes the name of the field with the words you want is "source". For
your example with A5 it would be:

Left ( LeftWords ( A5 ; 1 ) ; 5 ) & Left ( MiddleWords ( A5 ; 2 ; 1 ) ; 5)
& Left ( MiddleWords ( A5 ; 3 ; 1 ) ; 5)

6. Click OK to close the Specify Calculation dialog.
7. Click Replace.

You're done.

If you need this to always be the case, change A6 to a calculation field
and use the above calculation as its definition. If you don't need to
search it, you can set it as unstored and it won't take any space.

If you need to do this for different sets of records, save it as a script
step to apply later.


On Thu, Aug 1, 2013 at 3:33 PM, J. Landman Gay <jacque at hyperactivesw.com>wrote:

> This seems like it shouldn't be too hard, but I don't know FileMaker. Does
> anyone know how to:
>
> 1. Get the text in one cell
> 2. Concatenate the first 5 characters (or as many as exist) of the first 3
> words
> 3. Put the value into another cell
>
> Do that for every record.
>
> So, if the text in cell A5 is "Every good boy does fine", cell A6 would
> contain "EveryGoodBoy".
>
> --
> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
> HyperActive Software           |     http://www.hyperactivesw.com
>
> ______________________________**_________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/**mailman/listinfo/use-livecode<http://lists.runrev.com/mailman/listinfo/use-livecode>
>



More information about the use-livecode mailing list