I followed this link LiveCycle ES2 * Adobe LiveCycle Designer ES2 but is is not working.
So what isn't working, the ODBC connection or your code to populate the dependent dropdown controls? Can we see some of the code you are using or better still can you upload a copy of your form to a file sharing site and post a link to it in this thread. Is you dependent drop down values populated by the one ODBC call or is there one per value in the first dropdown.
You seem to be populating the presCity drop down list in the change event of the presState drop down list, but you still have the presCity drop down items bound to the data connection.
If this is fairly static information I would suggest storing it in the form at design time. Would let you avoid the while ODBC thing.
No presCity is not static.It get the data from database. If i'll not bind the presCITY with dataconnection it goes blank.City is coming from same database but different Table.How can i do this dynamically. And please also check the Add instance of Education Table.It is added but not showing up. Please give some solution to both problems.Very urgently needed.Thanks in advance.
We may be having a bit of a language problem, I was wondering how often you will need to add a city value to a state and if you know all the states and all the cities in the states before the user opens the form then there are easier ways to setup the form than an ODBC connection.
Also, not sure why not setting the binding for presCITY makes it go blank, as your code in the presState change event will populate it?
How can i do this.could you please do some necessary changes in the form and send back.What i have written in the presSTATE Change is not working.and other than this please check the instance issue also.It will be a great help.Please.
I wont be able to work on this for some time, but maybe this link will help LiveCycle Blog: Mehrstufige Dropdown-Liste//Multilevel dropdown list if you want to continue with your current approach maybe this link will help http://forms.stefcameron.com/2006/09/29/selecting-specific-database-records/
I might have time later in the week, if you are still stuck, post some of the data from your tables so I can include it directly into your form.
I have used the second link you provided by you http://forms.stefcameron.com/2006/09/29/selecting-specific-database-records/ but it gives error message Error: accessor 'xfa.sourceSet.city.#command.query.commandType' is unknown.
my code in 1st dropdown change
var sCategoryName = xfa.event.newText
var sCategoryId = $.boundItem(sCategoryName)
xfa.sourceSet.city.#command.query.commandType = "text"
concat("SELECT * FROM Dist_Master WHERE Dist_Code = ",sCategoryId, " ORDER BY Dist_Name;")
Shouldn't the third line be;
var oDataConn = Ref(xfa.sourceSet.city)
oDataConn.#command.query.commandType = "text"
as per Stefan's sample or did that fail as well?
It gives Error: accessor 'xfa.sourceSet.city' is unknown. I think Stefan is displaying the dependent data in a Text field but i want to display the list of data in drop down.
The original form you linked to had the city data connection with a capital C.
Have you change it or should your code be xfa.sourceSet.City ?
Try something like this bit of code in the preOpen event of your city dropdown list, which basically loops though the City record set looking for matching state codes and populating the drop down list.
if (xfa.resolveNode("$record.City.state_DCode").value == xfa.resolveNode("Row1.presSTATE").rawValue)
First you will have to remove the binding to this drop down list and remove the other code you have trying to populate the drop down list.
You will also need to change the EOF Action of the City Data View to "Stay EOF" or the isEOF() will never return true. This is on the last page of connection properties for the City connection.
You are using a very old version of Designer (at least 10 years old) and I can not make you form run at all. I would strongly suggest upgrading.
Thank you for your reply. I'll try the code and let you know. This designer version is provided by my office. can i upgrade it for free.
As i'm using Data Dropdownlist for both state and city it is already mentioned in initialize event.
var sBOFBackup = oDB.nodes.item(nDBIndex).query.recordSet.getAttribute("bofAction");
var sEOFBackup = oDB.nodes.item(nDBIndex).query.recordSet.getAttribute("eofAction");
Do i need to use this in preOPEN also.
There's no need to use a Data Dropdownlist for the city control, as you will now be populating the values by code, just use the normal dropdown list.
The code above, setting the bofAction and eofAction values would be the same as setting them in the connection properties, just right click on the City data connection in the Data View palette and click next to the last (or third) dialog. I would do this in the connection properties, and not use this code.
I don't know the know the pricing structure for LiveCycle Designer, probably depends on your office's contract with Adobe. But you could try a free trail.