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 / March 2008

Tip: Looking for answers? Try searching our database.

Default filename for saving infoPath 2003 forms into Sharepoint     Library?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Newbie Programmer - 05 Mar 2008 14:11 GMT
My infopath form has three fields:

1. UserName (string/char)
2. UserID       (integer)
3. RegistrationDate (date/time)

I'd like the form name to default to:  UserName-UserID-
RegistrationDate

When the user clicks on SAVE.  So, for example if the user name in the
form was 'John Smith', the ID was 127 and the registration date was
2009-10-01, the default filename presented to the user upon save would
be:

John Smith-127-2009-10-01

I think I see the place in the customized save script to place the
code.  However, I'm not sure what code I'd need to set this up.  The
form is using VBScript...
.-=] ExTrEmE [=-. - 05 Mar 2008 14:34 GMT
> My infopath form has three fields:
> 1. UserName (string/char)
[quoted text clipped - 3 lines]
> RegistrationDate
> John Smith-127-2009-10-01

Very simple without code. I did it in infopath 2007 but i think 2003 is
exactly the same.

You need to setup a send data connection to form library. When you create it
the wizard ask for a file name.. here you can click on "fx button" and enter
a function to build a filename based on form field.
Insert function, choose string concat, then click ok
now you have the concat function with 3 palceholeders..double click on the
first and select the form field you want.
Do the same for other fields. You can add how many fields you want.
When done.. confirm. Then finish the connection wizard.
now create a button "SAVE", with a rule that submit the form using
connection.. and choose yours.
Done :)

I hope this help.

Sorry for my english and confused explanation :P
Newbie Programmer - 05 Mar 2008 15:15 GMT
Wow - what a great technique - thanks!  Minimal programming.  I never
would have figured this one out...

One thing though.  There's no option for the user to make changes to
the filename.  What I had in mind was something like the windows
filesave dialog - where you can set up an initial default name, but
the user can still override.

Is there a way to do this using the same technique?

> > My infopath form has three fields:
> > 1. UserName (string/char)
[quoted text clipped - 22 lines]
>
> Sorry for my english and confused explanation :P
.-=] ExTrEmE [=-. - 05 Mar 2008 16:00 GMT
> Wow - what a great technique - thanks!  Minimal programming.  I never
> would have figured this one out...

And with this technique if you have a Form Services you can publish and open
directly on browser.. if you wirte code inside the form you need the
administrator to publish the form if you want to open it in browser.

> One thing though.  There's no option for the user to make changes to
> the filename.  What I had in mind was something like the windows
> filesave dialog - where you can set up an initial default name, but
> the user can still override.
> Is there a way to do this using the same technique?

So simple.. but I don't know if you like it.
Place a textbox named FileName to fill with the filename.
In the save button add a new rule (before the rule that save the form)
executed when FileName is empty .. then set FileName value with the formula
you wrote in the connection.
Then go in the form connection property and for module name.. clic on
formula button.. delete all the old formula.. then add a field.. obviously
the filename field.

So.. if filename filled by the use.. it take this as file name.. else if
blank.. it take your formula.
All clear? :)
Newbie Programmer - 05 Mar 2008 18:42 GMT
On Mar 5, 11:00 am, ".-=] ExTrEmE [=-." <extrema...@hotmail.com>
wrote:
> > Wow - what a great technique - thanks!  Minimal programming.  I never
> > would have figured this one out...
[quoted text clipped - 21 lines]
> blank.. it take your formula.
> All clear? :)

Hmm, yah that'll work.  Is there a way to add a field to the form so
that it is visible, but so that it doesn't print when somebody prints
the form?
.-=] ExTrEmE [=-. - 05 Mar 2008 19:18 GMT
> Hmm, yah that'll work.  Is there a way to add a field to the form so
> that it is visible, but so that it doesn't print when somebody prints
> the form?

You can use views. You can set up view for printing.. where the field don't
appear..

Rate this thread:






 
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.