Hi, I am taking my first stab at a jmp application.
I would like to insert a string from a textbox in a SQL statement used for a JMP query to a database. This string is my search parameter.
The script I have made does not seem to work and the solution is probably straight forward - but I am missing some basic JSL syntax understanding and was hoping to get help getting past this, for me, crucial point.
The script for calling and getting the string:
parameterScript = Function( {this},
{text},
// This function is called when the Text Edit Box value is committed
input = this << Get Text
);
The script for querying the database:
importDataPress = Function( {this},
// This function is called when the button is pressed
name = New SQL Query(
Connection( "ODBC:DSN=DATABASE;PWD=XXX;" ),
QueryName( "my_table" ),
CustomSQL( "SELECT * FROM DATABASE WHERE parameter == \!" + input + \!";" )
) << Run;
<<Get Button Name;
);
Thank you !