We help IT Professionals succeed at work.

Default naming for an infopath form site content type on sharepoint

Arnold Layne
Arnold Layne asked
on
I have a site content type for each employee's infopath timesheet form. So in the form library, they select new, and then the content or form type with their name on the content type. After they fill it out, they save it. The problem is, I need them to save it with their name and the date reflected in the form save name.

so for example, Fred Jones sees a Fred Jones timesheet after selecting the new button in the iibrary. He fills it out and then goes to save it (or submit it? which would be better?). I want the default to be FredJones06/09/10.xsn.

Can i do any sort of thing like this?? Or should it be done through some sort of submit process rather than a "save as" process? I'm open to any ideas. Thanks
Comment
Watch Question

Commented:
In the submit data connection first screen select the file name as now() will throw in the current date and time.

To add the name you would have to have a web service pulling that infomration and a field associated with it or another filed that defines the user name.
Arnold LayneDeveloper

Author

Commented:
What about if i put a username control on the form and make it mandatory? Could I get this info and concatenate it with now()? That would be perfect. Thanks.
Arnold LayneDeveloper

Author

Commented:
Actually, the user selects a starting Monday date for the time sheet from a date selector control and this is mandatory as well. So can i merely use that field and concatenate it to a user name field from the form? If so, how specifically. Thanks.
Commented:
concat(userName(), now())
Arnold LayneDeveloper

Author

Commented:
Thanks. This works in infopath, but not in the browser via sharepoint. I think it's because I don't see any submit button in the browser??
Arnold LayneDeveloper

Author

Commented:
I just had to make the submit button visible in the browser by going to advanced form option and then web browser. Thanks.