Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / August 2005

Tip: Looking for answers? Try searching our database.

how do I create a number generator in Infopath?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Matthew - 29 Jul 2005 22:02 GMT
I am developing InfoPath forms and want to create a field that will generate
its own number based off of information put into the form by the user.

Example:
Wo#: XX-OO-MM-071505-1

Where XX equals the first 2 letters on the Customers Name field (i.e.
MicroFax)
Wo#: MI-

OO equals the first 2 letters of the Location field (i.e. Columbia)
Wo#: MI-CO

MM equals the first 2 letters on the Project field (i.e. Dewatering)
Wo#: MI-CO-DE

The next six digits from the Date Submitted field (i.e.071505)
Wo#: MI-CO-DE-071505

And lastly the Revision field would need to change as the form version
history changed.

of course the Wo field would be a locked field to the user.

Many thanks in advance to you smart people!!!!
Alex [MSFT] - 30 Jul 2005 08:03 GMT
You can achieve this functionality with Default Values. Double-click on the
text box where you want the calculated value to appear; click on the f(x)
button near Default Values on the Text Box Properties screen. This will
bring up the expression builder. Then, use the concat [string concatenation]
and substring [getting a substring of a string] functions to achieve the
functionality you are looking for. Set this text box as read-only.

Good luck,
Alex

>I am developing InfoPath forms and want to create a field that will
>generate
[quoted text clipped - 22 lines]
>
> Many thanks in advance to you smart people!!!!
Matthew - 01 Aug 2005 18:48 GMT
Alex, thanks for the info, I have looked at this and just don't know how to
do it. Can you give me an example like below?

> You can achieve this functionality with Default Values. Double-click on the
> text box where you want the calculated value to appear; click on the f(x)
[quoted text clipped - 32 lines]
> >
> > Many thanks in advance to you smart people!!!!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.