Fetching Database Records into the AEM Designer form
I am using AEM Designer 8.0 and SQL Server. I have made a form and connected it to the SQL Server. I want to retrieve specific record from the table into the form depending upon the lookup ID entered in the form by the user. I want fetch specific record from the database.
Kindly please help.
On the Exit event of the lookup ID Textfield:
if(len($.rawValue)>0) then
var cdhid=$.rawValue
xfa.sourceSet.DataConnection.#command.query.commandType="text"
xfa.sourceSet.DataConnection.#command.query.select= concat("SELECT CPTY_SHORTNAME FROM CDH_BANKS_STG WHERE CPTY_CDHID=",cdhid,";")
xfa.sourceSet.DataConnection.open()
xfa.sourceSet.DataConnection.first()
endif
