Required Fields for dates and integers

C

Carl

I am working on a form based on an xsd I created. Whenever I specify an
integer or date in the xsd, the corresponding field appears as 'required'
with a red asterisk in InfoPath. Is there any to have the IP form not view
these as required? Here is how I am defining these in the xsd:

<xs:element name="LotID" type="xs:int" default="0" minOccurs="0"/>

Thanks for any help!
 
C

Carl

Thanks Greg, that explained it for me. The rest of the Dev-Nuggets was useful
as well.
 
J

John Tucker

I'm getting a "Page Not Found" error from the link above
(okay, it IS four years old ...)

I've got a couple of optional elements in a schema
(minOccurs="0") which have integer or date type so
they cannot be null if the elements are included in the instance.
For the particular form I'm building, I'm not including those fields at all.
But when the form is filled out and saved
it gets a validation error because InfoPath is creating the empty elements.
How do I arrange for the elements not to be included in the xml output?

thanks

Carl said:
Thanks Greg, that explained it for me. The rest of the Dev-Nuggets was useful
as well.


Greg Collins said:
Check out:
http://www.infopathdev.com/nuggets/default.aspx#The Difference Between Optional and Not Required


--
Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com



I am working on a form based on an xsd I created. Whenever I specify an
integer or date in the xsd, the corresponding field appears as 'required'
with a red asterisk in InfoPath. Is there any to have the IP form not view
these as required? Here is how I am defining these in the xsd:

<xs:element name="LotID" type="xs:int" default="0" minOccurs="0"/>

Thanks for any help!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top