SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

May I know if a field (probably text field) in InfoPath 2007 form that can auto-generate the following format: YYYYMMDD-HHMMSS-{LIST_NAME}

where YYYYMMDD is the year, month, day HHMMSS is the hour, minute, second {AUTHOR-NAME} is the name of the person who is filling up the form.

share|improve this question
up vote 1 down vote accepted

I have tested this formula inside my InfoPath 2007 form. Please try it and let me know if that is what you wanted.

concat(substring(now(),1,4),substring(now(),6,2),substring(now(),9,2),"-",substring(now(),12,2),substring(now(),15,2),substring(now(),18,2),"-",userName())

The first 3 substring basically give you the YYYYMMDD, the next 3 substrings give you the HHMMSS while the last one - userName will give you the creator of the form.

Please also disable the field from modification and set the field as empty in the first place.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.