B
bleitner
I've created a form in IP that submits to a SP form library, and the unique
identifier for the form, and subsequently the form name, is a concatenation
of four items; date string, location code, user initials, and a sequence
number. The first three items are easily accessible via other fields on the
form, but the sequence number I'm having a problem with as it starts over
each new day. This key is being defined to me as a requirement so I don't
have a choice on changing it, unfortunately. My thoughts for generating it
where to use an OnSubmit function that would look up all existing forms from
the AllItems.aspx page that matched the first portion of the key, for example
a key would look like 20051029AZBL001, and it's what would be listed in the
AllItems page of the Form Library as the Name, which is just the file name of
the form missing the .xml extension. I thought I could use managed VB.NET
code with DirectoryInfo("./") to move up one level in the tree from the form
(xsn) and then use GetFiles to retrieve the list of xml files filtering on
the first portion of the name to return only the number on the end, then
iterate through those numbers to find the largest, adding 1, then use that
value on submit. But this is not working as it's not returning any of the
files, even if I try to return all files, so maybe I'm not looking in the
right place and my DirectoryInfo method is incorrect? I don't have access
the the SharePoint file system so I can't check. Any help with generating
this key or the list of submited files would be helpful.
Thanks, Bob
identifier for the form, and subsequently the form name, is a concatenation
of four items; date string, location code, user initials, and a sequence
number. The first three items are easily accessible via other fields on the
form, but the sequence number I'm having a problem with as it starts over
each new day. This key is being defined to me as a requirement so I don't
have a choice on changing it, unfortunately. My thoughts for generating it
where to use an OnSubmit function that would look up all existing forms from
the AllItems.aspx page that matched the first portion of the key, for example
a key would look like 20051029AZBL001, and it's what would be listed in the
AllItems page of the Form Library as the Name, which is just the file name of
the form missing the .xml extension. I thought I could use managed VB.NET
code with DirectoryInfo("./") to move up one level in the tree from the form
(xsn) and then use GetFiles to retrieve the list of xml files filtering on
the first portion of the name to return only the number on the end, then
iterate through those numbers to find the largest, adding 1, then use that
value on submit. But this is not working as it's not returning any of the
files, even if I try to return all files, so maybe I'm not looking in the
right place and my DirectoryInfo method is incorrect? I don't have access
the the SharePoint file system so I can't check. Any help with generating
this key or the list of submited files would be helpful.
Thanks, Bob