Title
Need help with first FMP11 Script
Post
Hi all! I'm a longtime FM user, but have no experience with scripting. For my first script, what I am trying to do appears fairly straightforward, but I'm having trouble finding the right syntax.
Here's what I want to do:
In a database in table view, I wish to perform the following function:
if [field A] contains [this text],
print [this text] in [field B]
Basically checking the value on one field (column) and then printing a note in a separate notes field (column).
This also represents the script results, if "Apple" was the Field A value and "Yes" was the print to Field B value.
Field A Field B
Apple Yes
Orange
Apple Yes
Many thanks for taking a look...
Field B could be defined as a calculation field that evaluates as "yes" when Field A = "Apple".
But a scripted approach might be:
Enter FInd Mode []
Set Field [YourTable::FieldA ; "Apple"]
Set Error Capture [on]
Perform FInd []
Replace Field Contents [No dialog ; YourTable::FieldB ; "Yes" ]