Expand my Community achievements bar.

% formating if a whole number is inputted

Avatar

Former Community Member
Hello:



I have a numeric field on my form. I clicked on the field, went to the "Cell" tab clicked on "Patterns" and in the "Display" tab set my pattern to " num.percent{} "



My problem is that my user wants it to display 10% when they key in "10" (whole number) currently keying in "10" displays 1,000%.



So far the only way to display 10% is by keying in ".10". I understand why .10 gives me 10% but the behavior of the users will be to key in a whole number.



What is the best way to solve?



Thanks,



Keith.
5 Replies

Avatar

Former Community Member
Your display pattern should be set to:



num{99'%'}



The display pattern is set on the object palette/Value tab. click on patterns and choose the Display tab.

Avatar

Level 1

Doing it this makes gives the appearance of 99% but the value of the cell when using it in FormCalc is stil 9900%. What should I do if I want the value of the cell to be 99% when this user simply enters 99?

Thanks

Avatar

Former Community Member
That worked perfectly in fact I ended adding to it num{99.99'%'} to display less than 1 percent values.



I do have another quick question. In another field where I have dates. I have the following setting in the display pattern:



date{MM/DD/YYYY}



My issues is that it will only format/display if I click the calendar pop up and select a particular day. That is to say if I was to input the date manually like 06262008 or 6262008 it would display the number like I just inputted not in the display pattern that I had set (06/26/2008)



Any more ideas how to solve?



And thanks very much :-)



Keith.

Avatar

Former Community Member
I can only suggest you add a validation pattern and a validation message. Then when the user puts in the wrong format he is warned. They are supposed to be using the calendar to choose their date.

Avatar

Former Community Member
Paul I am using the validation message which does pop up when they don't use the calendar but after the user says okay to the message, the cursor moves to the next field and leaves the bad data entry. I want it to focus back on the field in question. Am I doing something wrong that is allowing the user to move forward?



Thanks,



Keith.