Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Select specific Data from ODBC SQL Data Connection

Avatar

Avatar
Level 1
christianr95618
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile

Avatar
Level 1
christianr95618
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile
christianr95618
Level 1

03-07-2018

Hi,

so here is my Problem.

I created a Form with a DataConneciton (ODBC and an SQL Qerry).

Tried the "normal" next,first,add etc. Buttons and everthing works fine.

How can i navigate to/select a specific data record?

I want a Textbox/field where i insert the Customer number and the adressfields, fistname lastname etc. is filled automaticly.

some kind of "select * from NameOfTabel where CustomerID like NamedTextField.rawValue"

I've read a lot about filling drop down fields or listboxes, but this is not practical for me because of the large data amount. (tried it, Adobe crash CPU@100% etc)

thanks for your help and excuse my poor language skills.....

Christian

View Entire Topic

Avatar

Avatar
Validate 1
Level 1
ANCA04
Level 1

Like

1 like

Total Posts

5 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile

Avatar
Validate 1
Level 1
ANCA04
Level 1

Like

1 like

Total Posts

5 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 1
View profile
ANCA04
Level 1

28-05-2019

So the answer to this specific question posted above, was to keep the field bound, then setting the value of the bound <textfield1>  to = 'null' at the start of the exit event.  The query 'SELECT UserID FROM FormsData WHERE UserID = 'DDuck', would return nothing not 'null'.  So by inference, setting the <textfield1> to 'null' before hand would ensure that the IF statement later on could evaluate if <textfield1> was null or returned something as != 'null'.  This worked like a charm.

I don't however have a good sense on working with variables for Database calls and working in that space.  The main reason is there are times where the Open, Save, Submit (push/pull) real time data bindings in the livecycle UI can be a mess, especially if there are multiples.  Currently with multiple bindings and mixed types, I am getting an unusual error where:

1761714_pastedImage_0.png

I am not sure if this is a binding string issue or not.  Curiously it commits this error to the last table column that I am attempting to bind. I like the idea of utilizing these standard bindings because, theoretically, they should be able to use the standard sourceSet.<DataConnection>.<SQL Functions, ie Addnew(), Delete(), First(), etc>.  Makes the coding easy.  But in practice, as it typical with LiveCycle Designer what should take an hour takes 14.    At least for the inexperienced.  We'll keep crack'a'lackin'.

Update:28MAY2019,  Looking through, oh 10 year old blogs,   I found this in the comments section of one of Stefan Cameron's blogs for a step back in time:

This is likely the explanation for why when I run app.alert(xfa.record.saveXML("pretty")); xfa.record.updatePassword node isn't represented, because I have another binding already loaded into the sourceSets model.  See below.

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

Stefan Cameron on June 22nd, 2009

Justin,

I’m glad to hear you find useful things on my blog!

I believe the problems you’re experiencing are related to the fact that with bindings to database data connections, there can only be one record that is active at any given time. When you do the “addNew()” call, the data in the fields currently bound to nodes in the data connection is set into the current record and a new record is created.

While you can display multiple database records at once in a form, you can’t edit multiple records at the same time.

To do this, I would recommend you read my post on inserting, updating and deleting records in a database. Using this technique, you could have the user add and fill multiple rows in the table and then have a single submit button that they click when they’re done. The submit button’s script would then insert new records into the database, one for each row in the table.

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

<me> So, I guess I utilize the .clone() method and open() close() methods to interact with the specific fields on the submit button click.  Brushing up on my SQL I am going to try to utilize some 'INSERT INTO SELECT' syntax and see if that gets me where I need to be.