Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / February 2006

Tip: Looking for answers? Try searching our database.

File attachment fields are always required

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
iconomie - 31 Jan 2006 15:59 GMT
Hello,

I got a problem on creating a form, based on a .xsd file which I got from a
webservice.
The .xsd schema contains several fields for PDF attachment. Some of them are
required fields and some are optional. My Problem is that Infopath treats
every attachment filed from this xsd file as required despite it's xsd
element is marked with 'minOccurs="0"'.
I tried to edit the datasource options and unset the mark at "cannot be left
blank" but Infopath disables the datasource editing.
Can anybody give me a hint to solve this problem?

I really need a form with several optional attachment fields.
best regards
iconomie
Kalyan Reddy - 31 Jan 2006 17:51 GMT
You cannot edit the UI fields in the datasource for the outside schemas

Open the schema.xsd and the field should be marked as 'nillable="true".Its
not depended on 'minOccurs="0"'.

and also check that in the Template.xml field should be set as  
'xsi:nil="true"

Hope this helps you
Signature

Kalyan Reddy
Visit www.autonomysystems.com

> Hello,
>
[quoted text clipped - 11 lines]
> best regards
> iconomie
iconomie - 01 Feb 2006 10:50 GMT
Thank you very much for your fast reply!
That seems to work!
But now there is another problem:

It doesn't seem to work for all fields.
I got two different complexTypes for the attachment fields called "document"
and "documentData":
-----
<xsd:complexType name="documentData">
  <xsd:simpleContent>
     <xsd:restriction base="xmime:base64Binary">
        <xsd:attribute ref="xmime:contentType" use="optional"
default="application/pdf"/>
     </xsd:restriction>
  </xsd:simpleContent>
</xsd:complexType>
-----
<xsd:complexType name="document">
  <xsd:all>
     <xsd:element name="date" type="xsd:date">
     </xsd:element>
     <xsd:element name="document" type="qw:documentData">
     </xsd:element>
  </xsd:all>
</xsd:complexType>
-----

One of the optional attachment fields uses the complexType "documentData":
<xsd:element name="confirmation" type="qw:documentData" nillable="true"
minOccurs="0">
Here Infopath treats the attachment field as an optional one. Works fine
here.

Another optional field uses the complexType "document":
<xsd:element name="federation" type="qw:document" nillable="true"
minOccurs="0">
Here Infopath seems to ignore 'nillable="true"' and treats the date and
attachment fields as required.  

Can anyone help me out?
best regards
iconomie

> You cannot edit the UI fields in the datasource for the outside schemas
>
[quoted text clipped - 21 lines]
> > best regards
> > iconomie
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.