Expand my Community achievements bar.

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

query a database record from client pin/id

Avatar

Former Community Member

Hi guys

with a lot of help from this forum - thanks once again !

we have got our form connected to an online database, and have got around the "not trusted" failures we were having.

what we are looking to do, and hopefully someone has done something similar (ie a bit of guidance would be great) is to have the user enter

their id into a form field, and have that id correspond to their database record, and somehow trigger on the exit event a call to the database so that all database fields are read, and every correspondingly names field in the form is populated.

our test database is very simple - it has id, firstname, midmane and lastname (and a hashed password field used in our submissions routines we dont need to worry about here) 

i dont really know how, but i guess i know what, which is something like ---on id field exit event - for each field in id record that = a fieldname in this form, import value of field in database record corresponding to id and insert in correspondingly named field in form

if anyone has a code sample, any good books or demo's please point us in the right direction

thanks in advance

2 Replies

Avatar

Level 9

Hello ,

So after creating a database connection and after binding the the fields on the form you are all set to update your database with the help of few scripts .

Generally in a database connection we use button for updating the data , and the scripts should be placed in the on click event of the buttons . So it's good idea to use the buttons over here .

Here are some good sources which you can refer to .

http://adobechats.adobe.acrobat.com/p69655795/

http://forms.stefcameron.com/2006/09/18/connecting-a-form-to-a-database/

http://forms.stefcameron.com/2006/09/29/selecting-specific-database-records/

Avatar

Former Community Member

thanks - those references will be really helpful