Prepopulating the dropdown with database service is not working

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Prepopulating the dropdown with database service is not working

archana
Hi,

I have tried to populate the dropdown using database service which is not working for me.

I have created database service with query

SELECT state_id, state_name FROM master_state_table
WHERE state_id = <sql:param type="xs:string" select=""/>

then created Action service

i have selected the dynamic drop down control name in destination selection control and i gave
items as response/row
Label as state-id
Value as state-name

when i test my form , i got as empty dropdown
Reply | Threaded
Open this post in threaded view
|

Re: Prepopulating the dropdown with database service is not working

Alessandro  Vernet
Administrator
Hi archana,

Several things could go wrong in a case like this. It could be a problem with the data source setup, with the data you have in the database, or something else, and it is hard for us to say since we can't reproduce the issue. A first step, I'd recommend you check the orbeon.log and look for exceptions there. For instance, if there is an problem with the datasource setup, it will be showing up there. And I'm sorry not to be able to point you to something more precise.

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Prepopulating the dropdown with database service is not working

archana
Hi Alessandro,

Since i too thought as there may be a mistake in datasource setup. but when i check with the text field its working fine. i mean depanding on the input field the value get loaded in another field . so it cannot be a datasource issue. can u share me a spike or link where it mention how to load value from database into dynamic drop down



Reply | Threaded
Open this post in threaded view
|

Re: Prepopulating the dropdown with database service is not working

jarod73
This post was updated on .
In reply to this post by archana
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Prepopulating the dropdown with database service is not working

archana
Hi ,

Below i have attached the screen shot of service i have created for dynamic dropdown. i have even tried /*/row as items . but still i got empty dropdown

Jez
Reply | Threaded
Open this post in threaded view
|

Re: Prepopulating the dropdown with database service is not working

Jez
Hi Archana

Is your 'State' control a Form Builder Dynamic Data Dropdown control? If so, from what I am aware, it's not designed to be populated by a Form Builder Action; try a standard Dropdown Menu control instead (see http://discuss.orbeon.com/populate-dropdown-with-data-form-database-service-tp4657031.html)

Regards

Jez
Reply | Threaded
Open this post in threaded view
|

Re: Prepopulating the dropdown with database service is not working

Alessandro  Vernet
Administrator
Hi Archana,

Jez was answering to someone else with a very similar problem, and had more information here:

http://discuss.orbeon.com/populate-dropdown-with-data-form-database-service-tp4657031p4657040.html

Hopefully this helps, otherwise, just let us know.

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet