CFSELECT - Yes/No to display showing as true or false

I'm having a problem with the code below. All three of the boxes work really well together. But I have a problem with some of the data that is returned by the getResponses method in the third cfselect below. All the display returned values appear correctly (ex. A, B, C, good, bad, approved, not approved) in the dropdown menu, EXCEPT when the values are 'Yes' and 'no '. For some reason any 'yes' and 'No' are returned as 'true' and 'false' instead.

I executed the getResponse outside the cfselect dumping the returned array method and the values are displayed correctly in the 'yes' and 'no '.


< name cfselect = "category_cd."
bind = "CFC:getCategories(category_cd='#Form.category_cd#') '"
style = "width: 300px;"
bindOnLoad = "true" / > < br / >


< name cfselect = "question_cd."
bind = "CFC:getQuestions(category_cd={category_cd},question_cd='#Form.question_cd#') '"
style = "width: 300px;"
bindOnLoad = "true" / > < br / >


< name cfselect = "response_id.
bind = "CFC:getResponses(question_cd={question_cd},response_id='#Form.response_id#') '"
style = "width: 300px;"
bindOnLoad = "true" / > < br / >


In the method that I created, I sank the value from the query, but it always returns as 'true' and 'false '.


< cffunction... >
...
< cfquery name = "qryResponses"... >
Select response_id, CAST (response_txt as char (30)) as response_txt, response_sort_order_nbr,.
CASE WHEN response_id = < cfqueryparam cfsqltype = "cf_sql_varchar" value = "#arguments.response_id #" >

THEN 0
2 ELSE
END as kind
answers
where question_nm_cd = < cfqueryparam cfsqltype = "cf_sql_varchar" value = "#arguments.question_cd #" >
< / cfquery >

< cfloop query = "qryResponses" >
< cfset responseArray [qryResponses.currentrow] [1] = qryResponses.response_id >
< cfset responseArray [qryResponses.currentrow] [2] = qryResponses.response_txt >
< / cfloop >
< cfreturn responseArray >

< / cffunction >

Anyone else experienced this problem with Yes/No values converted to true or false?

Looks like ajax is making it as boolean.

Very probably. You could try the hack of the space. Sometimes adding a space in values is sufficient to stop them being treated as boolean.  But check stackoverflow.com too. I know I've seen this issue before, but can't remember if it was more elegant than the hack of space solutions...

Tags: ColdFusion

Similar Questions

  • my iphone 5 c opens more after that I was invited to be updated with itunes. now, the display shows only itunes usb cable and logo. read some tips here, but nothing happened. any help will be much appreciated.

    My iPhone 5 c opens more after that I was invited to be updated with iTunes. now the display shows iTunes logo and the USB cable. I have read and applied some tips here, but nothing happened. Any help will be much appreciated. Thank you.

    https://discussions.Apple.com/message/30014877#30014877http ://

    Read the post from sierrawren . It helped me to fix my phone. Now it works perfectly fine. Hope it can help others too.

  • HP Officejet 4630e all in one: the time on my printer display shows the wrong time

    The clock on the display shows the wrong time.  Does anyone know how to rectify this please.

    Hello

    The date and time settings would cause problems of synchronization with Eprint if incorrect. The date and time should be accessible from the Preferences menu.

    Try this

    Power reset

    1. Without putting off the product, disconnect the power cord from the back of the product.
    2. Wait 30 seconds and then plug the power cord into the back of the product.
    3. If the product is not already on, press the power button to turn it on.

    Now, try to change the date and time and check.

    Where this fails, try this

    Setup > tools > restore defaults

    Try to set the date and time of return

    NOTE: This will remove network also settings so you need to redo the configuration of the network

    Measures to restore the network configuration

    http://support.HP.com/us-en/document/c03834108

    Although I am an employee of HP, I speak for myself and not for HP.

    Click on the thumb BRAVO upwards on the left to say 'thank you '.

    Make it easier for others to find solutions by checking a response "Accept as Solution" if it solves your problem.

  • What should I do when the display shows "at the service of the user could not connect. Unable to load the user profile... ?

    I connect to my profile and I am not able to log in. The display shows "at the service of the user could not connect. User profile cannot be loaded... » » ?

    Hello

    These methods should help for Windows 7 or Vista.

    References to Vista also apply to Windows 7.

    You can try to fix it with Safe Mode - repeatedly press F8 as you bootup. The ADMIN account in trunk
    Mode has no default password (unless someone has changed the password so it should be available).

    Some programs such as the updated Google (if you added the toolbar Google, Chrome or Google Earth)
    has been known to cause this problem.

    Error message when you log on a Windows Vista-based or Windows 7 using computer a
    Temporary profile: "the user profile Service has no logon. Unable to load the user profile.
    http://support.Microsoft.com/kb/947215

    How to fix error "the user profile Service has no logon. User profile cannot be loaded. »
    http://www.Vistax64.com/tutorials/130095-user-profile-service-failed-logon-user-profile-cannot-loaded.html

    How to fix error "your user profile was not loaded correctly! You have been connected with a
    temporary profile. "in Vista
    http://www.Vistax64.com/tutorials/135858-user-profile-error-logged-temporary-profile.html

    BE VERY CAREFUL IF YOU USE THIS ONE:

    DO NOT USE THE ACCOUNT HIDDEN ON A DAILY BASIS! If it corrupts you are TOAST.

    -------------------------------------------------------------------------------------------------------------------------------------

    For Windows 7:

    How to enable or disable the built-in Windows 7 Administrator account
    http://www.SevenForums.com/tutorials/507-built-administrator-account-enable-disable.html

    Use the Admin account hidden to lower your user account APPLY / OK then wear again to
    ADMIN. This allows clear of corruption. Do the same for other accounts if necessary after the
    above message.

    You can use the hidden - administrator account to make another account as an ADMINISTRATOR with your same
    password (or two with the same password) use a test or difficulty to another.

    You can run the command Admin account hidden from the prompt here if
    necessary.

    How Boot for Windows 7 System Recovery Options or use a Windows 7 boot disk.
    http://www.SevenForums.com/tutorials/668-system-recovery-options.html

    What are the system recovery options in Windows 7?
    http://Windows.Microsoft.com/en-us/Windows7/what-are-the-system-recovery-options-in-Windows-7

    How to create a Windows 7 system repair disc
    http://www.SevenForums.com/tutorials/2083-system-repair-disc-create.html

    -------------------------------------------------------------------------------------------------------------------------------------

    For Vista:

    How to enable or disable the real built-in Administrator account in Vista
    http://www.Vistax64.com/tutorials/67567-administrator-account.html

    Use the Admin account hidden to lower your user account APPLY / OK then wear again to
    ADMIN. This allows clear of corruption. Do the same for other accounts if necessary after the
    above message.

    You can use the hidden - administrator account to make another account as an ADMINISTRATOR with your same
    password (or two with the same password) use a test or difficulty to another.

    You can run the command Admin account hidden from the prompt here if
    necessary.

    This tells you how to access the System Recovery Options and/or a Vista DVD
    http://windowshelp.Microsoft.com/Windows/en-us/help/326b756b-1601-435e-99D0-1585439470351033.mspx

    What are the system recovery options in Windows Vista?
    http://Windows.Microsoft.com/en-us/Windows-Vista/what-are-the-system-recovery-options-in-Windows-Vista

    How to create a Vista - free methods recovery disk
    http://www.Vistax64.com/tutorials/141820-create-recovery-disc.html

    -------------------------------------------------------------------------------------------------------------------------------------

    If you cannot access your old account, you can still use an Admin to migrate to another (don't forget
    always leave to an Admin who is not used except for testing and difficulty account).

    Difficulty of a corrupted user profile
    http://windowshelp.Microsoft.com/Windows/en-AU/help/769495bf-035C-4764-A538-c9b05c22001e1033.mspx

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle="" -="" mark="" twain="" said="" it="">

  • I got a blue screen when stop or restart during a display shows stop and blue bg (Windows Vista Business)

    I got a blue screen when stop or restart during a display shows stop and blue bg (Windows Vista Business)

    After starting my Windows I got these message below

    Signature of the problem:
    Problem event name: BlueScreen
    OS version: 6.0.6002.2.2.0.256.6
    Locale ID: 2052

    More information about the problem:
    BCCode: a
    BCP1: 00000000
    BCP2: 00000002
    BCP3: 00000001
    BCP4: 82E9837B
    OS version: 6_0_6002
    Service Pack: 2_0
    Product: 256_1

    Files helping to describe the problem:
    C:\Windows\Minidump\Mini041011-01.dmp
    C:\Users\TanXR\AppData\Local\Temp\WER-104083-0.SysData.XML
    C:\Users\TanXR\AppData\Local\Temp\WER8B1F.tmp.version.txt


    C:\Windows\Minidump\Mini041011-01.dmp

    View your dump using file:
    BlueScreenView v1.32 - seen BSOD (blue screen) crash information stored in the dump files.
    http://www.NirSoft.NET/utils/blue_screen_view.html

    For each accident displayed in the upper pane, you can view the details of the drivers of the devices loaded during the crash in the lower pane. Do a search on google for the drivers to know what device belongs to uninstall, reinstall, or download the latest driver from the manufacturer website.

  • Just purchased lightroom 6 boxed version, try installing and the display shows 'no internet connection' when in fact my connection is good

    Hello

    Need help desperate please

    Just purchased lightroom 6 boxed version, try installing and the display shows 'no internet connection' when in fact my connection is good

    Hi TomasB,

    Please reset the file browser & Internet hosts.

    Reset Internet Browser refer: change or reset the settings of Internet Explorer - Windows help

    • Close all windows of Internet Explorer that are currently open.
    • Open the office and then tap or click the Internet Explorer icon on the taskbar. Change your settings will affect Internet Explorer and Internet Explorer for the office.
    • Press or click the Tools button and then tap or click on Internet options.
    • Press or click on the Advanced tab, and then tap or click Reset.
    • In the reset Internet Explorer settings dialog, tap or click Reset.
    • When Internet Explorer has finished the application default settings, press or click on close and then press or click OK. You will need to restart your PC for these changes to take effect.

    Reset the hosts file

    Reference: https://support.microsoft.com/en-us/kb/972034

    Mac: How do I edit the file Hosts on Mac OS X - TekRevue

    Reference: Solutions to connection errors, activation and connection with Creative Suite and creative Cloud applications.

    Let us know if it helps.

    Kind regards

    ~ Mohit

  • Created a form of contact, but when the customer has received potential customer demand, check boxes change to a true or false, there a way to change Yes or no?

    Created a form of contact, but when the customer has received potential customer demand, check boxes change to a true or false, there a way to change Yes or no?

    This is the system default, you can customize either she or you try using forms of third party:

    http://musewidgets.com/collections/all/products/forms-bundle

    Thank you

    Sanjit

  • Can I put a READ function in a structure of matter TRUE or FALSE?

    Hello

    I have a vi that operates as a controller for a mechanical system of engines.  There are several sensors of various types, make its contribution to the vi, including encoders, whose period is measured.  The attached vi is the period of encoder part of measure. It measures 15 periods and tells me that the average of the 15 with each iteration of the loop.

    In my application, the encoder measurement period is useless unless the vi knows ALL OTHER sensors in the hardware configuration to measure values in the desired interval.  For example, the sensors A, B and C must all measure between 5 and 10.  If they are all shows values between 5-10, then we want the value to encode it to read and display.  If only one of the sensors, say, is action 12, then, we don't want the value of period for READING or further processed.  So, it is easy to set up the sensors A, B, C, to give a TRUE or FALSE based on what they are handy or not, and if all 3 are TRUE, then, this value can easily be passed to the structure of case that holds my function of READING for the period.  What is a good way to do this?  The goal is to eliminate some unnecessary runtime that would consume the period READ function, as well as all the calculations that are performed on the period collected value.  The data period are of no use if one of the other sensors is not in the correct range.

    If one of the other sensors is out of reach, we want to skip reading encoder altogether.  So, it is easy to structure a Boolean in my vi as indicated in the attachment.  If I do it this way, it throws an error, or just skip READING until the BOOLEAN value is true once again?  Is there a better way to prevent PLAYBACK to occur if one of my other values of the sensor is not in the correct range?

    Thank you

    Dave

    Of course, you can put a reading within a box structure. For your application, simply check that your sensors are all at the beach (palette of comparisons), AND the T/F and use the result of this for the structure of your business. (If you already have the cheque to its scope, I can't see here because you have 5 subVIs that I can not open here.

    Cameron

  • Verizon iPhone 6 with are unlocked. True or false?

    true or false?

    So if I update the software of the ios 9.1 to 9.2 ios, which will affect to my unlocked phone?

    Another thing can only use the phone overseas with the international sim card?

    Thank you.

    The side GSM of 6 more Verizon iPhone is unlocked, update it will not affect the unlocked state. Yes, you can use it with international GSM providers.

  • True and false - combinations

    Hello

    I have three Boolean values in my code, and another part of the combination of their values (true or false) control code. Since there are three Boolean types, and they can be true or false, I have 8 possible combinations (2 ^ 3). What should I do, given that the three Boolean values, have a digital indicator that shows what combination I have? The digital indicator range is from 1 to 8.

    Thanks in advance

    Daniel

    Create a table, and then use the table of Boolean to the number.

  • True or false quiz

    Hello

    I wrote a 'gross' behavior I attach to 2 sprites called True and False. When the 'correct' sprite is clicked on the 'bad' sprite mixture showing 20% and vice versa. The two sprites when clicked on edit also members of a tick or cross according to their parameters.

    It's pretty tough, because I'm still learning lingo - but I'm trying to achieve the following objectives...

    Once the choice has been made it is there no additional interaction on both sprites (without change of executives or navigate to another marker). Something that kills the code somehow.

    What is happening now is that I can choose an answer and the other sprites mixture runs at 20% - that's fine. But if I click the sprite that has a mixture of 20% then it makes the selected original sprite turn at 20%. Basically, I want to make the inactive mixed sprite.

    Any help much appreciated.

    Andy

    Hi Andrew

    Thanks for the fix. I think I understand the logic of the moment true / false. Although I had to read about 10 times to get the logic in my head!

    Concerning

    Andy

  • N905 true or false?

    Dear Lenovo team.
    I bought a Lenovo N905 phone model Aliexpress 8 core version.

    Link: http://www.aliexpress.com/snapshot/6435500193.html?orderId=65317904231776

    The phone is very slow compared to 8-core.
    Please confirm that it is true or false model.
    The seller wrote the Chinese version, I believe him.

    Sorry to inform you, but it's a fake.

    http://www.China-devices.com/thread-Smartphone-fake-Lenovo-N905

  • Help, I'm controlling a flashing, sending him a value true or false within a box structure.

    Help, I'm controlling a flashing, sending him a value true or false within a box structure. The LED changed to resemble a specific indicator, so I can't just create a property node for LED and the value that flashes (unless someone can tell me how). I can see a number of ways to put my blinker indicator changed positions, but they all use while loops. What I am struggling with is controlling the while loop using a Boolean true or false.

    What I try to achieve is to create a virtual car dashboard and control using serial data. I built a VI as follows 3 bytes from the serial port and the data that I send to the VI will be in the form of a letter followed by 2 numbers. I uses the letter to settle the case structure then change numbers to different cases selected by the letter.

    I compare then 2 numbers and according to the ASCII values, I'm a true or false for the comparison.

    So once I set the indicator flashes, I need that it continues to Flash until he gets another command to stop.


  • My price is true or false? answer me.

    I received the email for the price of the United Kingdom. WINNER NO. 4. Is it true or false?

    Batch number. YPB/08/APA-43658
    Reference no. YPN560992008
    Code.UK / + QU34005 security
    Amount.One million GBP

    Probably fake. Its probably a scam. Ignore / delete

    Unless you entered it, you win nothing

  • I got sms: I won 570000 books in Microsoft Mobile Promo of 8447910649 is true or false... ?

    I got sms: I won 570000 books in Microsoft Mobile Promo of 8447910649 is true or false... ?

    Hello vilaskhandare,

    Unfortunately, it is, as usual, a fake.

    This forum post is my own opinion and does not necessarily reflect the opinion or the opinion of Microsoft, its employees or other MVPS.

    John Barnett MVP: Windows XP Expert associated with: Windows Expert - consumer: www.winuser.co.uk | vistasupport.mvps.org | xphelpandsupport.mvps.org | www.silversurfer-Guide.com

Maybe you are looking for

  • Cannot find drivers for phone Astro on mini HP laptop computer.

    Original title: Astro software pilot virtual 2 (V2) HIE My HP Mini laptop has failed to locate the driver software for my virtual Astro 2 phone. I wanted to sent music and other files using blue-tooth. How can I solve the problem? Concerning

  • ACS 5.5 (3495) Backup / restore

    Problems with backup & restore on ACS 5.5 running on the platform 3495. Incremental backups are scheduled every day at 02:00.  Full backup will be held each week at 06:00.  Scrub data is scheduled for 04:00 (by the system - cannot change this value).

  • How can I get rid of a useless account?

    I have a CC account for work. At some point, I have to have created an account using my personal e-mail address. I see that we are entitled to a free account (for example if we have more than one computer), but I have a Mac and I would like to delete

  • How to change RedirectUrl by java code in service

    Hello worldI have a new MY_WORKFLOW_APPROVE service.1. If the service successfully completes, I need to redirect the AAU to HOME_PAGE2. If the service does not properly complete, I need to redirect the AAU to Workflow My Page assignmentsIs it possibl

  • Password PDA... I forgot my password! :(

    null