How to pass down variables in BE_FilemakerSQL()

Discussion created by RazvanPopKun on Oct 31, 2016
Latest reply on Oct 31, 2016 by RazvanPopKun



I'm trying to integrate some SQL functions into our software, in order to update some tables that are not in relationship with the tables assigned to current layouts.  I want to make a modular email system where records are to store information (address/subject/message/attachment) from the table I am working on. Because I have several dozen tables, I am searching for a solution in which I do not have to make a new relationship between each table and the email table and having to change layouts in order to create/alter/drop records. I had used for several years ExecuteSQL to extract info from unrelated tables, but SQL commands like update, insert or delete are not supported. Because we where also using Base Elements plugin with our software I'm interested in using their feature richer SQL command BE_FIlemakerSQL(), but i cannot figure how to pass down variables.


BE_FileMakerSQL (


UPDATE \"Emails\"

SET \"Sender\"='random@email.com'

WHERE \"id\" = 1



A simple update like the one above, where I try to attribute a value to a field or i compare a field to a value is compiling, but I get an error when instead of a value I try to pass down the value of a field. I tried different variants:


SET \"Sender\"=? which is the filemakersql syntax,  SET \"Sender\"= UTL.Sender (tablename.fieldname), SET \"Sender\"=@aux, where @aux was declared before UPDATE as SQL variables are declared. Can somebody help me with the syntax?