Hi you all, I need to use a Query DB with more "where" variable

Hi you all,
I need to use a Query DB with more "where" variable... In the Setup Tab I tried to force a node variable but it doesn't works.
The Query that I used is:

SELECT count(purchaserequisition.prno) as prno FROM purchaserequisition,pritem WHERE pritem.prchasereqisition_item_prno=purchaserequisition.prno AND purchaserequisition.plant=ac!plantId ac!OtherAndValue

So in the ac!OtherAndvalue there are others process variable that i send to this query BUT it doesn't works.

Any suggestion for solving this doubt?

Thanks...

OriginalPostID-68190

OriginalPostID-68190

  Discussion posts and replies are publicly visible

Parents
  • In that case you better use a gateway to check the value of the pv and direct the flow to a different Query RDBMS node that includes the other query.

    Or you can use the the executequery(datasource, query) function that comes with the Advanced Form Utilities plug-in. This would replace your Query RDBMS node. This is an example:

    =executequery("java:/jdbc/appianMySQL","select count(a_id) as numberOfFruits from fruit")

    given it takes a string you can easily make it dynamic. I am not a big fan of using this expression to execute a query since this will return it in a type of JSON-style array (its main purpose is to be used by the attachAutocompleteFromQuery function)
Reply
  • In that case you better use a gateway to check the value of the pv and direct the flow to a different Query RDBMS node that includes the other query.

    Or you can use the the executequery(datasource, query) function that comes with the Advanced Form Utilities plug-in. This would replace your Query RDBMS node. This is an example:

    =executequery("java:/jdbc/appianMySQL","select count(a_id) as numberOfFruits from fruit")

    given it takes a string you can easily make it dynamic. I am not a big fan of using this expression to execute a query since this will return it in a type of JSON-style array (its main purpose is to be used by the attachAutocompleteFromQuery function)
Children
No Data