I'm finally getting around to playing with Flash Forms in CF7, but I've run
across a maddening issue.

I am populating a cfselect from a query.  The query has an id column of
numbers, and a label column of text.

My cfselect is populating properly, but the values are getting changed
through the addition of a ".0" on the end.

For instance, if my data looks like:

Bob     12345
Sue     64533

The CFSelect is producing values of 12345.0 and 64533.0.  The "SELECTED"
value is being given as "12345", so therefore, the proper one is not getting
selected.

If there any way to tell CFSELECT not to reformat my values?

What's odd, is that I have other CFSELECTS that also get numbers, and they
are working fine, so it's an odd problem.

I think the problem might have to do with where the queries come from.

For the ones that are not working, I'm creating the queries using
QueryNew(), as the data is coming from a Java object as an array of objects,
and I want a query.

For example a query is generated by this code:

        variables.sections =
queryNew("sectionId,name,tag,description,topicname,statusid,topicid,topicpat
h,sitesectionid,storydisplaybyline,storydisplaydateline");
        for (i=1; i lte ArrayLen(sectionArray); i=i+1) {
                section = sectionArray[i];
                queryAddRow(variables.sections);
                //sec = structNew();
        
querySetCell(variables.sections,"sectionId",val(section.getSectionId()));
                querySetCell(variables.sections,"name",
toString(section.getName()));
                querySetCell(variables.sections,"tag",
toString(section.getTag()));
                querySetCell(variables.sections,"description",
toString(section.getDescription()));
                querySetCell(variables.sections,"topicName",
toString(section.getTopicName()));
                querySetCell(variables.sections,"statusId",
val(section.getStatusId()));
                querySetCell(variables.sections,"topicId",
val(section.getTopicId()));
                querySetCell(variables.sections,"topicPath",
toString(section.getTopicPath()));
                querySetCell(variables.sections,"siteSectionId",
val(section.getSiteSectionId()));
                querySetCell(variables.sections,"storyDisplayByLine",
val(section.getStoryDisplayByLine()));
                querySetCell(variables.sections,"storyDisplayDateLine",
val(section.getStoryDisplayDateLine()));                
        } 

I'm assuming the problem comes from me using the Val() function when I
populate the cell.

But, still, CFSELECT should not be changing number formats.  Or, at least, I
should be able to specify the number format.

So, any ideas about a workaround?

Thanks! 

Edward Smith

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:233167
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to