Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

Dyn. SQL Query

Avatar

Former Community Member
Hello,



i ve got a PDF with upto 5 Database connections.

The last connection is a SQL Query.



I ve tried to change this query per j-script code, but the PDF is still using the pre defined Query i used in this dataconnection.



--------------------------------------------------------------

Code:



var oRec = xfa.record.SQL_Query; //SQL_Query = My Database connection

var MyQuery = "Select * from Resource_Units;"; //Resource_Units = Table



oDB.resolveNode("#command").query.select.Value = MyQuery;



oDB.open();



oDB.first();



Bla.rawValue = oRec.RFSNo.value; //RFSNo = Column in my TAble



oDB.close();
0 Replies