Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Insert data from database

Avatar

Level 1

Hi,

I have a database that I am getting data into my PDF form. I have a button "Populate" that populates the fields with the selected data from a list box. I am using Formcalc and usiing a click event script for the button:

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

var oDC = Ref($sourceSet.Axess.clone(1))

oDC.#command.query.commandType = "text"

oDC.#command.query.select.nodes.item(0).value = Concat("SELECT Ordhuvud.Nummer, Ordhuvud.Kundnamn, Ordrad.Rad, Ordrad.Produktben, Ordrad.Kommentar, Ordhuvud.Levnamn, Ordhuvud.Levadress, Ordhuvud.Levpostadress FROM Ordhuvud LEFT JOIN Ordrad ON Ordhuvud.Nummer = Ordrad.Nummer WHERE (((Ordrad.Rad)=1) AND ((Ordhuvud.Nummer)=",ordernummer.rawValue,"))")

oDC.open()

//work around

levtext = Concat(Levnamn.rawValue, "\u000a", Levadress, "\u000a", Levpostadress.rawValue)

Table1..Row1.beskrivning.rawValue = Concat(Produktben, "\u000a", Kommentar)

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

I want to populate one field with Levnamn + Levadress + Levpostadress. Can you do that directly without go via my hidden fields?

Kind regards / Magnus

0 Replies