I'm using InfoPath 2003 with SP1. I have a request from a user to replicate
a date field to an invoice # field using the format mmddyy. Is this
possible? If so - How? In other words based upon the date which is selected
by the requester - the invoice number (mmddyy) will be automatically created.
Hi Karyl,
Here are steps to create a sample:
- Create a new, blank InfoPath form
- Add a Date Picker control with a name of: myDate
- Add a text box control with a name of: myInvoice
- Right-click on myInvoice and choose Properties
- Click the "fx" button next to the Value field
- Paste the following expression in the formula box:
concat(substring(myDate, 6, 2), substring(myDate, 9, 2), substring(myDate,
1, 4))
- Preview and test - when you select a date from myDate, the concatenated
pieces should appear in myInvoice.
I hope this helps!
Scott L. Heim
Microsoft Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights
Karyl - 24 Aug 2005 22:33 GMT
Scott -
It worked beautifully - YOU ARE MY HERO!! Thanks!

Signature
Karyl
> Hi Karyl,
>
[quoted text clipped - 19 lines]
>
> This posting is provided "AS IS" with no warranties, and confers no rights
Scott L. Heim [MSFT] - 25 Aug 2005 14:52 GMT
Hi Karyl,
Glad I was able to help!
Take care,
Scott L. Heim
Microsoft Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights