Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

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.