Did you try putting the @ in "". So your find is "@" ?
You're right, that works. However, I don't understand the reason why it didn't work in the first place since it's a text field?
And if this is the case, I assume to 'automate' it I'll need to have a text in which to paste the email address and a calc field wraps it in " " and does the find.
Enter find mode and then pull down the "operators" drop down. You'll see that several characters, including @, have a special function when used as find criteria. Enclosing it in quotes tells FileMaker: "I don't want to use this as a find operator. I just want to use it as another text character."
Ah! I get it.
If searching for a user record by their email is likely to be the most efficient discriminator, but obviously has the problem of the '@', what might be the most efficient way to paste their email into a 'Lookup email' field, then perform a find to see if there's a matching record by the 'email' field? The 'Perform Find' script step appears to use specific values rather than a value entered into deliberately into a field to then find by.
Couldn't you create a text field field set to global storage and then put that on your layout as a search box.
Then you enter the email address you are looking for in that field. Next to it a Search button that runs a script that does a fiend but puts your entire email address between quotation marks for the find.
That script would be:
Enter Find More [Uncheck pause]
Set Field [Contact::email ; "\"" & g_EmailAddressFind & "\"" ]
Set Error Capture [On]
You just have to make sure your search field is set to global storage. Then I'm sure this might work.
If I just put '@' in the search field, it finds all records containing an '@'. However, if I put a specific email address in the search, then the script fails to find that email.
BTW, remind me why you use "\"" either side? Yes I need to bracket the find field contents within "", but I have forgotten why it's necessary to use "\"
Filemaker added that \ automatically when I created that calculation.
Normally quotation marks are used to put text in a calculation. But in this case we actually want to add quotation marks to the email address we are going to find.
If you put a pause in the script right after the set field step you will see that this script does a find with the quotation marks added to the email address you are trying to find.
Got it. Oddly when I put """ before + after the value, the first was reduced to "\" whereas the 2nd was "\"".