No. Not with the standard FileMaker functionality.
Be aware of the difference in functionality between script steps and functions (built-in or custom).
I would like to find, add or edit (certain) records in custom function?
AS mbraendle said: Not from inside FM - but custom functions are pure text, therefore You can copy that text and paste it in a texteditor (BBEdit, Textwrangler, Editor (Win)' etc - NOT Word or other 'wordprocessors') and do the work there, copy the cf back to FileMaker. Parameters have to be added using the FM-CF functionality.
IF You have all of Your cf's in such a 'library' (briandunning.com is one of the cf-libraries available on the net), You can search, edit, etc in the texteditor. But: You have to copy altered cf's back to the FileMaker file...
IF You have an analyzer like CrossCheck, You can search for specific cf-items in the analyzer - but that's just for searching, no changes possible - but if You're just searching for something, it's fine
btw: There are helpers like myFMbutler's ClipManager that might help in that process. At least earlier versions crashed on my systems - therefore I stopped using them (on OSX, on Windows, the seemed to work fine)
Okay, as I thought (but hoepd to have missed something) it is not
possible and therefore I have to build a "custom script" that can be
used by other scripts (like custom function). At least I am sure now not
to have missed something.
Am 25.02.15 um 09:30 schrieb erolst:
Can I add or edit records in cutsom functions?
Antwort von erolst
/Discussions/ - Komplette Diskussion anzeigen
well... the question is: 1) can a custom function access and change record data and 2) create a record.
The answer to 2) is no.
The answer to one is twofold; of course you can access data, either by passing a parameter into the function (recommended) or by reading data using indirection. Setting data from inside the custom function is not possible, agree with Martin (@mbraendle). That is because a custom function is context-free. And thus FileMaker cannot parse a function that has context references.
Usually the question arises because some problem needs to be solved and the cf comes into mind especially to programmers from other "programming worlds". Perhaps, Liuna.media, you post the problem you want to solve and can get better help then.
OK... I never thought about using cf to create records - after reading luna's answer, I realized that I mis-interpreted the question (some people in my environment are using the term 'record' for almost everthing..)
you can call MBS Plugin to perform SQL queries including UPDATE/INSERT.
Yes, you can do it in "external function", not "custom function".