The Replace Command
The Replace Command
The replace function is a powerful feature of FileMaker Pro (the software platform PayGo is designed on top of) that we have the capability to use. A basic summary of what it is useful for is when you want a field in an entire found set of records (for instance, when you search and get a list of customers) to be ‘replaced’ by other information in the entire set. You can replace the contents of a field in a few records, or in every record in the found set. An example of a time you may find the replace function useful is if, perhaps one of your employees consistently misspelled Chicago as Chicaga and you wanted to correct this in many records at once.
Note: The feature itself can be incredibly powerful if used properly but is very dangerous because there is NO Undo!
This document will cover a basic replace. For more advanced replace operations we recommend you contact support for advice.
In this example, we will find a set of records in the Inventory database that we want to change the Department from one value to another on. Lets say from “Misc” to “Widgets”. They were probably all put into the wrong department and you want to mass-correct them, this is where Replace can come in handy if used properly.
IMPORTANT: To have the access privileges necessary to use this feature you must be logged in as a LEVEL 0 user account in PayGo.
Now, to try a sample of the replace feature (PLEASE DO NOT ATTEMPT THIS ON YOUR LIVE DATABASES UNLESS YOU ARE AWARE OF THE REPERCUSSIONS!!!):
From the Inventory screen (For our example):
1. Click “Find Inventory”
2. In the field for Department on the find screen, select a department from your drop down list. If you do not see it on the list, hit Escape to the pop-up and type the name you want in the field.
3. Run your find request and click the first record in the found set that comes up.
4. Click the “Department” field on this record – Pick the new department you want all records in this found set to have as their new department. Make sure your cursor stays in this field after selecting it – as this is important to make sure this field is the one you are replacing the contents of.
5. On the program’s menu, go to the “Records” menu, and select “Replace Field Contents”.
6. You will get a dialog box saying something similar to “Permanently replace the field contents of the field “[Field name you are replacing]” in the [number of found records] records of the found set. Below this it will say “Replace with ‘your new department name’.
7. Verify that everything looks OK to you, and Select “Replace”. WARNING: THIS CAN NOT BE UNDONE. MAKE SURE YOU HAVE A BACKUP OF YOUR DATA.
8. The program will cycle through all records in the current found set, replacing the Department field’s value with whatever new value you set this current record to.
9. You’re done.
Other Replace Options (Advanced Users Only)
In the dialog for replace there are two other options that are only for very advanced users of FileMaker Pro, they are listed below.
– A serialized number: Replace with serial numbers, and then type the starting value for the serial numbers in Initial value, and the incremental value in Increment by. If the field is defined to automatically enter a serial number, you can select Update serial number in Entry Options to reset the next value in the Options for Field dialog box.
– A calculated value: Replace with calculated result, and then click Specify. In the Specify Calculation dialog box, enter the calculation you want evaluated. (The result must match the field type of the replaced field.) Click OK.
PayGo is a solution provider for independent retailers based in Rochester, Minnesota. Our primary focus is on point of sale / retail management software. We also offer a Merchant Account integration, a WooCommerce integration, Digital Marketing Services, and more.