Creating Unique ID for Sharepoint Infopath Form
Referred URL
http://www.codeproject.com/Articles/37093/Submitting-an-InfoPath-Form-to-SharePoint-with-a-U
This Article shows how to create a unique ID on Sharepoint Infopath Form
The Now() function will return the following type of date and time format: 2008-05-30T15:12:20
The function will come up with Ch1108288710. A long number but it is a reliable sequence of number for the next 99 years.
Set condition: filename is blank:
Set Action 1: Set field’s value filename = concat (Myfield, now()):
Use field on the form i.e., contactName
, followed by the function now()
to add the date & time and give the form a unique name.
You can also rely on the exact date and time.
concat(substring(., 1, 2), concat(substring(now(), 3, 2), substring-before(substring-after(today(), "-"), "-"), substring-after(substring-after(today(), "-"), "-")), normalize-space(string(number(substring(now(), 12, 2)) * 3600 + number(substring(now(), 15, 2)) * 60 + number(substring(now(), 18, 2)) * 1)))
0 comments