Results 1 to 12 of 12

Thread: In percentage, should we expect the user to enter 4 for 4%?

  1. #1

    Thread Starter
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,123

    Arrow In percentage, should we expect the user to enter 4 for 4%?

    If we format a value for percent "{0:#%}" then it will become 400%, and this also applies to all the 3rd party controls I've tried. I've used custom format as a workaround for this but perhaps you guys could enlighten me on this one. If a user inputted 4 for example then did the user intended 4% or 400%? If it were me that I would expect the 4 to be 4% rather than 400%.

    Thanks!
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  2. #2
    PowerPoster cicatrix's Avatar
    Join Date
    Dec 2009
    Location
    Moscow, Russia
    Posts
    3,654

    Re: In percentage, should we expect the user to enter 4 for 4%?

    I'd used NumericUpDown control for this because even if you put a BIG RED LABEL saying which format to use there would be no less than 50% of users who will input the data wrongly. Don't leave users any chance. Expecting 4 instead of 0.04 is natural. Your app should simply divide the input by 100.

  3. #3
    PowerPoster
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,070

    Re: In percentage, should we expect the user to enter 4 for 4%?

    Just put a label saying "%" next to the input (textbox?). Then there is no ambiguity for the user. If he types 0.04, then it will say 0.04% and the user should not expect any different. If he meant 4%, he should have typed 4. It's the same for anything else, such as currency. If you have to enter the cost of some item (let's say 56 cents) in a textbox that says:
    Code:
    [         ] $
    then surely you wouldn't type 56? You would type 0.56, because 56 cents is 0.56$.

  4. #4
    Discovering Life Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    12,001

    Re: In percentage, should we expect the user to enter 4 for 4%?

    On more suggestion is to show the percentage sign as the user types in the textbox so the moment the user types 4 it shows as 4% in the textbox?
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved


    MyGear:
    ★ CPU ★ Ryzen 5 5800X
    ★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
    ★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
    ★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
    ★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
    ★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
    ★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
    ★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
    ★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
    ★ Keyboard ★ TVS Electronics Gold Keyboard
    ★ Mouse ★ Logitech G502 Hero

  5. #5
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,537

    Re: In percentage, should we expect the user to enter 4 for 4%?

    Depends on the target audience (an accountant might be comfortable in 0.04 ... but a front office person might expect 4)
    but I agree, give the user some visual cue up front to let them know what the expectation is.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  6. #6
    PowerPoster stanav's Avatar
    Join Date
    Jul 2006
    Location
    Providence, RI - USA
    Posts
    9,289

    Re: In percentage, should we expect the user to enter 4 for 4%?

    Quote Originally Posted by koolsid View Post
    On more suggestion is to show the percentage sign as the user types in the textbox so the moment the user types 4 it shows as 4% in the textbox?
    You wouldn't want to do this... Just use a textbox (or a numericupdown) and a label with the "%" as its text.
    Let us have faith that right makes might, and in that faith, let us, to the end, dare to do our duty as we understand it.
    - Abraham Lincoln -

  7. #7
    PowerPoster cicatrix's Avatar
    Join Date
    Dec 2009
    Location
    Moscow, Russia
    Posts
    3,654

    Re: In percentage, should we expect the user to enter 4 for 4%?

    And a bit of advice. If you don't know which option to implement implement them both and have an options screen where a user can set the mode he/she likes more. Something like this:

    [ ] Check this if you want your percent style 0,04 or uncheck it to enter 4 instead.

  8. #8
    PowerPoster stanav's Avatar
    Join Date
    Jul 2006
    Location
    Providence, RI - USA
    Posts
    9,289

    Re: In percentage, should we expect the user to enter 4 for 4%?

    Why would someone prefer to type "0.04" (4 keystrokes) over "4" (1 keystroke) is beyond me
    Let us have faith that right makes might, and in that faith, let us, to the end, dare to do our duty as we understand it.
    - Abraham Lincoln -

  9. #9
    Member
    Join Date
    May 2010
    Posts
    60

    Re: In percentage, should we expect the user to enter 4 for 4%?

    Depends.

    If you dont want to train the app user use the "common sense" 4 stands for 4%.

  10. #10
    Discovering Life Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    12,001

    Re: In percentage, should we expect the user to enter 4 for 4%?

    Quote Originally Posted by stanav View Post
    You wouldn't want to do this... Just use a textbox (or a numericupdown) and a label with the "%" as its text.
    Hi Stanav.

    Any specific reason on why not this option?
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved


    MyGear:
    ★ CPU ★ Ryzen 5 5800X
    ★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
    ★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
    ★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
    ★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
    ★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
    ★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
    ★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
    ★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
    ★ Keyboard ★ TVS Electronics Gold Keyboard
    ★ Mouse ★ Logitech G502 Hero

  11. #11
    PowerPoster cicatrix's Avatar
    Join Date
    Dec 2009
    Location
    Moscow, Russia
    Posts
    3,654

    Re: In percentage, should we expect the user to enter 4 for 4%?

    Quote Originally Posted by koolsid View Post
    Hi Stanav.

    Any specific reason on why not this option?
    Don't. Just try to implement this. Handle every possible option for user to type in, paste, type inside the existing string, etc, handle appearing double percent signs, etc. Just try it in order not to do that again.

    And generally it's a good practice to leave the user input unchanged.

  12. #12
    PowerPoster
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,070

    Re: In percentage, should we expect the user to enter 4 for 4%?

    Quote Originally Posted by koolsid View Post
    Hi Stanav.

    Any specific reason on why not this option?
    I don't see how it's any different to just showing the % sign behind the textbox. Showing it in the textbox is only going to be confusing to the user. Can he select it? Can he delete it? Should he delete it? Should he type it himself if he accidently deletes it? Not to mention it will be more work for the programmer. You should have all bases covered so that the % sign shows up no matter what happens, and then you need to parse the input back to remove the % sign again... So why not just leave it out in the first place?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width