Expand my Community achievements bar.

Process a delimited value into a drop-down list and bind value

Avatar

Level 4
LiveCycle Designer 8.05<br /><br />WHY we want to do this. In the past Ive hard coded JS arrays* to display and bind the Department and Division fields. This has worked well and has become extremely popular with the user groups. A large number of forms already carry this coding. <br /><br />However Im concerned that if something changes in any of the values it will be necessary to manually update ALL the forms. So Im attempting to be pro-active and develop a web service that can be accessed from each form instead!<br /><br />This is the process we're trying to develop:<br />1. User enters their USERID into a text field and hits an execute button that will go to a web service and bring back values from a database to auto-populate 7 fields.<br /><br />2. Four of the fields are drop-down lists [Department, Division, Location, and SubLocation]. Each of these fields will have two functions. [1] To automatically display the value for that specific USERID. [2] To provide a drop-list of all the other field values in case their information is out-of-date. <br /><br />QUESTION: How can you bind these four drop-down fields together? For example, the sequence of events we want to automatically happen is:<br />- user selects the appropriate Department which causes the Division drop-down list to change to only display divisions in that department<br />- user selects the appropriate Division which causes the Location drop-down list to change to display only the locations for that division<br />- user selects the Location which causes the causes the SubLocation drop-down list to change to display only the sublocations for that location<br /><br />IS THIS EVEN POSSIBLE ?? We've been able to get the 1st function working (populating the 7 fields with values from the database). But we can't figure out how to bind the fields together.<br /><br />This is the code we are using to receive the data for the Department field via the web service.<br /><?xml version="1.0" encoding="utf-8" ?> <br />- <ArrayOfAnyType xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://london.col/"><br /> <anyType xsi:type="xsd:string">Boards and Commissions</anyType> <br /> <anyType xsi:type="xsd:string">CAO's Department</anyType> <br /> <anyType xsi:type="xsd:string">City Clerk</anyType> <br /> <anyType xsi:type="xsd:string">Community Services</anyType> <br /> <anyType xsi:type="xsd:string">EES - Env. Programs & Solid Waste</anyType> <br /> <anyType xsi:type="xsd:string">EES - Admin & Development Services</anyType> <br /> <anyType xsi:type="xsd:string">EES - Administration</anyType> <br /> <anyType xsi:type="xsd:string">EES - Fleet Facilities&Dept. Resour</anyType> <br /> <anyType xsi:type="xsd:string">EES - Roads and Transportation</anyType> <br /> <anyType xsi:type="xsd:string">EES - Wastewater and Treatment</anyType> <br /> <anyType xsi:type="xsd:string">EES - Water</anyType> <br /> <anyType xsi:type="xsd:string">Elected Officials</anyType> <br /> <anyType xsi:type="xsd:string">Environmental Services</anyType> <br /> <anyType xsi:type="xsd:string">Environmental Services - Operations</anyType> <br /> <anyType xsi:type="xsd:string">Finance and Administration</anyType> <br /> <anyType xsi:type="xsd:string">Finance and Corporate Services</anyType> <br /> <anyType xsi:type="xsd:string">Legal Services</anyType> <br /> <anyType xsi:type="xsd:string">Planning and Development</anyType> <br /> </ArrayOfAnyType><br /><br />======================================================================<br />* This is the array that is currently hard-coded into each form to bind the Division field to the Department field. (Ive shortened the list to save space.) <br /><br />var g_arrayDivisions = new Array();<br /><br />//BOARDS AND COMMISSIONS<br />g_arrayDivisions[0] = new Array("Canadian Medical Hall of Fame", "Cross Cultural Learning Centre", "London Arts Council", "London Block Parent Program", "London Convention Centre", "London Economic Development Corporation", "London Hydro", "London Police Service", "London Public Library", "London Transit", "Middlesex-London Health
0 Replies