2 Replies Latest reply on Jun 26, 2013 6:12 AM by nstopak

    Pattern for currency data entry

    nstopak Level 1

      I have a number of fields that are for the entry of dollar amounts.  I'd like to be able to limit the number of digits, and permit users to enter the value with our without the dollar sign, and with or without commas.  I've tried a number of different edit and display pattern combinations but have yet to find one that permits what I imagine is a commonly desired behavior.  What am I missing?



        • 1. Re: Pattern for currency data entry
          Diego-Silva Level 2



          You might be missing the Limit trailing digits, for instance, you can set for 10,2.


          Then you configure the patterns something like this:

          Display: num{($z,zzz,zzz,zz9.99)}

          Edit: num{($z,zzz,zzz,zz9.99)} | num{(z,zzz,zzz,zz9.99)}


          Hope it helps


          • 2. Re: Pattern for currency data entry
            nstopak Level 1

            Hi Diego,


            Thank you for your reply.


            I see now that I didn't really supply enough information in my request.


            I'd like to configure a field (decimal or numeric) to display a currency value with 2 decimal places.  A display pattern like the one you suggested works fine.  The problem seems to be putting together the correct set of edit patterns.


            Users should be able to enter values with or without a leading dollar sign, with or without commas and with or without decimal digits, e,g. "999999.44", "999,999.44", "999999", 999,999", $999999.44", $999,999.44", $999999" or "$999,999".  I have yet to find a combination of settings that permit all of these combinations.  Surely this must be possible, but I'm still stumped.


            Here's my current lineup of edit patterns which still convert a number of the candidate values above to "$0.00":


            num{($zzz,zzz,zzz,zz9.99)}|num{(zzz,zzz,zzz,zz9.99)}|num.currency{($zzz,zzz,zzz,zz9.99)}| num{(zzzzzzzzzzz9)}|num{(zzz,zzz,zzz,zz9)


            Seems like some of these may be redundant and still others clearly need to be added.


            Best Regards,