holstermedia@gmail.com

executeSql with multiple scripted dynamic parameters

Discussion created by holstermedia@gmail.com on May 26, 2016
Latest reply on May 26, 2016 by user19752

I'm trying to build a query builder in filemaker. So then the queries can be saved and recalled nicely...

The query side is working fine but I'm struggling to get multiple parameters to work.

 

Here's my calculation:

 

Let (

[

~q=myTable::queryCalc;

 

 

// test 1

~p1="%red%";

~p2="%blue%";

~p=~p1 & ";" & ~p2

// fails

 

// test 2

~p ="\"%red%\";\"%blue%\""

// fails

 

];

ExecuteSQL (~q; "" ; ""; ~p )

)

 

 

this currently fails with no ?

 

If I replace:

ExecuteSQL (~q; "" ; ""; ~p )

with

ExecuteSQL (~q; "" ; ""; "%red%";"%blue%" )

it works...

 

so why? in test 2 ~p is exactly "%red%";"%blue%" with all the quotes and semicolons!

Outcomes