Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.

Moderators: ArturoRobles, ArturoRobles

Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
By sgkalluri
Hello everyone,

I have a textbox in a dynaform that is populated by execution of its related sql query (defined in the textbox control).

Is there a way by which I can prevent the execution of the query based on certain conditions when the DynaForm is loaded for the user?

Best wishes,
There is no way that I know to prevent an SQL query from happening when the DynaForm loads, but you can use JavaScript to clear the contents of the field after the query takes place:
if a textbox or textarea, then use this code:
Code: Select all
if ( /*some condition*/ ) {
If a dropdown, checkgroup, radiogroup or suggest box, then use this code to clear the list of options set by the SQL query:
Code: Select all
if ( /*some condition*/ ) {

See: viewtopic.php?f=47&t=710111
Thanks a lot Amos!

I experimented by writing the SQL query in the following manner:

Select abc from def where (1 = @=xyz)

Where the @@xyz variable is set to 1 in JavaScript when certain conditions are met when the form is loaded and to any other value when those conditions are not met.

However, you are right. The query does have to execute. It just does not return a value.

Best wishes,

Maybe try increasing your thread stack size? Seems[…]

I use PM 3.4. Android push works while IOS push do[…]

[quote=ziadeh post_id=823031 time=1550759948 user_[…]

I have to support reports in processmaker 3.4. A s[…]