I have a simple textbox on an infopath form to enter an invoice amount. The
customer wants to have all sorts of custom logic appied to the text, for
example typing in "555" results in $5.55, typing in "555." results in
$555.00. Typing in "55555" results in $555.55". Saves them time they
say--don't ask.
In any case, I have the logic in place, but I find that infopath strips out
a trailing period automatically for numeric values. For example, when I set
a break point in the code, if you type "123.00" then you get "123.00", but if
you type "123." then you get "123" without the trailing period.
Interestingly, if you type "abc." then you do get "abc." with the period.
Has anyone seen this or have a workaround for it? I actually want the
trailing period as I need to apply custom logic to the value based on the
fact that it has a trailing period.
Thanks in advance
>I have a simple textbox on an infopath form to enter an invoice amount. The
>customer wants to have all sorts of custom logic appied to the text, for
>example typing in "555" results in $5.55, typing in "555." results in
>$555.00. Typing in "55555" results in $555.55". Saves them time they
>say--don't ask.
I believe that's fairly common.
>In any case, I have the logic in place, but I find that infopath strips out
>a trailing period automatically for numeric values. For example, when I set
[quoted text clipped - 4 lines]
>trailing period as I need to apply custom logic to the value based on the
>fact that it has a trailing period.
Sounds like you are using a numeric field type. You'll have to change
it to a text field type to avoid losing the trailing period.
Regards,
Steve
--
Please post questions to the newsgroup; everyone benefits.
This posting is provided "AS IS" with no warranties, and confers no rights.
Sample code subject to http://www.microsoft.com/info/cpyright.htm
Miles - 08 Dec 2004 21:43 GMT
Steve,
Thanks for your reply. I have tried changing the xsd file so that the field
is a text field and that didn't solve the problem. It's almost as if the
infopath form sees the "1000." and figures that you don't need that last
period. The fact that "abc." works show me that it is using a text field.
Is there somewhere else besides the .xsd to set the textbox property as a
text field?
Thanks.
Miles
> >I have a simple textbox on an infopath form to enter an invoice amount. The
> >customer wants to have all sorts of custom logic appied to the text, for
[quoted text clipped - 22 lines]
> This posting is provided "AS IS" with no warranties, and confers no rights.
> Sample code subject to http://www.microsoft.com/info/cpyright.htm
Miles - 08 Dec 2004 22:19 GMT
Fixed it.
The problem was the data type. However, you have to change the datatype in
the xsd and then delete and re-create the textbox. The textbox had some
strange behavior and remebered the previous datatype. I printed out the data
type and it said "string", but behaved like numeric (stripped trailing
period). By deleting and re-adding the textbox everything worked.
Miles
> Steve,
> Thanks for your reply. I have tried changing the xsd file so that the field
[quoted text clipped - 33 lines]
> > This posting is provided "AS IS" with no warranties, and confers no rights.
> > Sample code subject to http://www.microsoft.com/info/cpyright.htm