cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1877
Views
0
Helpful
21
Replies

Fetch - checkbox or radio button support?

Tylor Hagerman
Level 1
Level 1

Fetch - checkbox or radio button support?

Ideally I'd like to perform a fetch and have the resulting query populate radio or checkbox inputs, just like it does for select inputs.  Has anyone had any luck with that?  When a change an existing field with a working fetch from select to checkbox or radio, the fetch still runs but nothing happens in the form -- no checkbox or radio items show up.

21 Replies 21

James Fuller
Level 1
Level 1

In HTML select elements function differently and have different properties associated with them.  Select elements have an "options" property which is an array that allows you to manipulate the options that will be shown in the list.

Neither of the radio or checkbox elements have this attribute.  This could be why you're not seeing what you would expect.

Coren Coren
Level 1
Level 1

You need to assign your values for each field's index element. For example

  radioField[0]=='value1'

  radioField[1]=='value2'

and so on and so forth..

Ruud Ligtenberg
Level 1
Level 1

Coren,

 

We use the select button feature. I attached a file with screenshots for clarification and the there in mentioned cfm-file.

 

Hope this helps,

Ruud

James Fuller
Level 1
Level 1

Coren,

Could you provide an example for us?  Thanks!

Tylor Hagerman
Level 1
Level 1

This is great!  Thanks for sharing!

Do you guys know how to query a database and fill the values in a checkbox field when a form loads.  We have been able to connect to the database within ServiceDesigner, but nothing displays on the form when the page loads...

Any help would be much appreciated!

Thanks,

Charlie

Hi Tylor:

How do you setup a data source on the application server (we're using jboss)?  Do you mean the .XML file which has all of the query statements for the rcFetch?

Charlie

Tylor Hagerman
Level 1
Level 1

We initially had the same issue when trying to get this to work for the first time.  The key thing for us to realize was that in ServiceDesigner it uses the Cold Fusion data source to validate the query, etc.  But in myServices when it is building out the the page it looks for a datasource in the application server with the same name to query with.  In our case it meant setting up a datasource in WebSphere with the same name as the data source in Cold Fusion.  Once we did that, the queries executed corre

Tylor Hagerman
Level 1
Level 1

I forgot something else.  We're on 2006.0.6 and we had to install a hotfix to get querying to work correctly for option lists.  I can't remember if it also applied to checkboxes or not.  It was something that was officially fixed in 2007.1.  If you contact customer care about this issue, you could have them cross reference our case number 6545 which might save some time.

Tylor Hagerman
Level 1
Level 1

I don't know anything about jboss.  But I'm not talking about the rcfetch.xml file.  For us we had an existing datasource defined in our app server for the actual RC transactional database.  We had to add another entry for each data source we wanted to dynamically query using the options in ServiceDesigner.  When you use fetch it only uses the ColdFusion data sources.  When you use the options in ServiceDesigner to have values filled based on a query it looks for a datasource in the application server wi

James Fuller
Level 1
Level 1

Charlie,

JBOSS uses XML in the deploy folder (one up from the RequestCenter.ear).  You should see there XML files with the following naming convention:
DataSourceName-ds.xml

You'll need to copy your existing XML for each datasource you want to connect to.  Then open each of the XML files and modify the "connection-url", "user-name" and "password" elements with your datasource information.

This coupled with the datasource updates made in ColdFusion should get you where you need to go

Thanks guys!  Thumbs up for you all ;-)

James,

Any idea if the file name is different for SQL server/JBOSS?   The DataSourceName-ds.xml does not exist in that directory in our environment (RC 2006.0.9 with SQL/JBOSS).   We do have a mssql-ds.xml file that looks like it has datasource connection information.  

Thanks,
Angelo

James Fuller
Level 1
Level 1

Angelo,

The mssql-ds.xml is the default file for an MS SQL datasource.  Use that file with the instructions above to create additional files for your external datasources.

We too use JBOSS/MSSQL.

Cheers!

PS: the name of the file should match your datasource.  If the datasource in ColdFusion is DominionRC, the file should be DominionRC-ds.xml. 

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: