Bikur Cholim בקור חולים

Tuesday, December 23, 2014

Replacing Text in a Field

Replacing Text in a Field:
Need to find out the difference between “Set Field [ ]” or, since you want all records, “Replace Field Contents [ ]” (Source: [ii]):
Replace Field” updates the specified field for ALL records in the current found set, not just the current record. 
“Set Field” only Replaces the Field Contents in the Current Record (Source: [iii]).
There are two good options I can think of:

  1. One is the Find and Replace Command. 
  2. The other is the Replace Field Contents Command. 

Both of these can operate on all records in a found set. 
One problem you may run into with either of these in a multi-user setup is record locking problems. 
If another user is editing a record that is in your found set, you won't be able to do the replace.
One way around this is to use “Set Field [ ]” in a looping script. 
Then you can check for record locking and receive notification about which records weren't modified.

Would there be any point? 
The “Replace” Command is designed to operate on the whole found set. 
The “Set Field” Command will do a similar thing for only the current record.

Wednesday, May 21, 2014

Data Formatting

21/03/2014 Ask FileMaker (Mar 21, 2014 04:46 AM PDT Case: 140321-000058): 
Find cannot find any telephone number in a Number Field where Data Formatting is set to Number and "As Entered" is the Format: 020 8800 6833 cannot be found, whilst it can be found in a Text Field?  
A.  This has something to do with the Data Formatting (Inspector->Data->Data Formatting).