So today I went to make a simple database based (that sounds weird but whatever), form in InfoPath for reporting security incidents, but InfoPath misread the datatype of my UID field which I had as a datetime time stamp of now(). It instead read it as simpleType with HEX data. This would cause the form to not submit properly, not tell the user it didn’t submit and change the formatting of the data. So I went in and hand edited the field type. Read on to find out how to hand edit field types in InfoPath.

First open your template in Design Mode.
Next do File\Save As Source Files
Browse to the folder with your new source files and go through the tmp.xsd files, one of them will have your data fields in it.

You should see some XML goo like this:

<xsd:attribute name="FIELDNAME" use="required">
<xsd:simpleType>
<xsd:restriction base="xsd:TYPE">
<xsd:maxLength value="50"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>

Easiest fix, just put string in place of Type. But I wanted something more elegant and changed it to a long datetime like this:

<xsd:attribute name="FIELDNAME" type="d:dateTime.notz" use="required"/>

trackback image tell a friend image Permalink Image

Post Tags: microsoft  sharepoint  infopath  forms 


Next entry: Sharepoint Random CLSID Errors Previous entry: Need Ideas



Comments: (1)
on Wed, Mar 26th, 2008 at 04:24 PM

gooo lol


Page 1 of 1 pages

Post a comment

Name:
(Required)

Email:
(Required)

URL:

Smileys

Remember my personal information

Notify me of follow-up comments?

Submit the word you see below: