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 / January 2006

Tip: Looking for answers? Try searching our database.

Required filed

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Carlos - 12 Jan 2006 12:00 GMT
Hello everybody,

I have doubt, why is it required ('Cannot be blank') a field when is added
to the schema as base64Binay or Datetime?

here you have an example of my schema

Any suggestions will be apreciated,
Thanks, Carlos

<?xml version="1.0" encoding="utf-8" ?>
<xs:schema targetNamespace="http://tempuri.org/XMLSchema.xsd"
elementFormDefault="qualified"
    xmlns="http://tempuri.org/XMLSchema.xsd"
xmlns:mstns="http://tempuri.org/XMLSchema.xsd"
    xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="Employee">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="FirstName" type="xs:string" />
                <xs:element name="LastName" type="xs:base64Binary" />
            </xs:sequence>
        </xs:complexType>
    </xs:element>
</xs:schema>
Bob Chauvin ( Paix dehors ) - 12 Jan 2006 16:49 GMT
Is this a custom XSD built outside infopath?

> Hello everybody,
>
[quoted text clipped - 21 lines]
> </xs:element>
> </xs:schema>
Carlos - 13 Jan 2006 07:44 GMT
Thanks, yes it is, and I can show you another one made by Visual Studio
following an infopath lab where happens the same:

<?xml version="1.0" encoding="utf-8" ?>
- <DataSet xmlns="http://tempuri.org/">
- <xs:schema id="DataSet1"
targetNamespace="http://www.tempuri.org/DataSet1.xsd"
xmlns:mstns="http://www.tempuri.org/DataSet1.xsd"
xmlns="http://www.tempuri.org/DataSet1.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
attributeFormDefault="qualified" elementFormDefault="qualified">
- <xs:element name="DataSet1" msdata:IsDataSet="true" msdata:Locale="es-ES">
- <xs:complexType>
- <xs:choice maxOccurs="unbounded">
- <xs:element name="Purchases_Table">
- <xs:complexType>
- <xs:sequence>
 <xs:element name="ID" msdata:ReadOnly="true" msdata:AutoIncrement="true"
type="xs:int" />
 <xs:element name="Priority" type="xs:string" minOccurs="0" />
 <xs:element name="Charge_To" type="xs:string" minOccurs="0" />
 <xs:element name="Date_Requested" type="xs:dateTime" minOccurs="0" />
 <xs:element name="Date_Required" type="xs:dateTime" minOccurs="0" />
 <xs:element name="Submitted_By" type="xs:string" minOccurs="0" />
 <xs:element name="Submitted_Email" type="xs:string" minOccurs="0" />
 <xs:element name="Submitted_Phone" type="xs:string" minOccurs="0" />
 <xs:element name="Supplier_Name" type="xs:string" minOccurs="0" />
 <xs:element name="Supplier_Web" type="xs:string" minOccurs="0" />
 <xs:element name="Ship_Method" type="xs:string" minOccurs="0" />
 <xs:element name="Deliver_To" type="xs:string" minOccurs="0" />
 <xs:element name="Deliver_Address_1" type="xs:string" minOccurs="0" />
 <xs:element name="Deliver_Address_2" type="xs:string" minOccurs="0" />
 <xs:element name="Deliver_Email" type="xs:string" minOccurs="0" />
 <xs:element name="Deliver_City" type="xs:string" minOccurs="0" />
 <xs:element name="Deliver_State" type="xs:string" minOccurs="0" />
 <xs:element name="Deliver_CP" type="xs:string" minOccurs="0" />
 <xs:element name="Deliver_Country" type="xs:string" minOccurs="0" />
 <xs:element name="File_Attached" type="xs:base64Binary" minOccurs="0" />
 </xs:sequence>
 </xs:complexType>
 </xs:element>
 </xs:choice>
 </xs:complexType>
- <xs:unique name="Constraint1" msdata:PrimaryKey="true">
 <xs:selector xpath=".//mstns:Purchases_Table" />
 <xs:field xpath="mstns:ID" />
 </xs:unique>
 </xs:element>
 </xs:schema>
- <diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
- <DataSet1 xmlns="http://www.tempuri.org/DataSet1.xsd">
- <Purchases_Table diffgr:id="Purchases_Table1" msdata:rowOrder="0">
 <ID>10</ID>
 <Priority>Low</Priority>
 <Charge_To>pepe</Charge_To>
 <Date_Requested>2005-12-21T00:00:00.0000000+01:00</Date_Requested>
 <Date_Required>2005-12-17T00:00:00.0000000+01:00</Date_Required>
 </Purchases_Table>
- <Purchases_Table diffgr:id="Purchases_Table2" msdata:rowOrder="1">
 <ID>11</ID>
 <Priority />
 <Charge_To />
 <Date_Requested>2006-01-05T00:00:00.0000000+01:00</Date_Requested>
 <Date_Required>2006-01-27T00:00:00.0000000+01:00</Date_Required>
 <Submitted_By>some</Submitted_By>
 <Submitted_Email>man</Submitted_Email>
 <Supplier_Name>who</Supplier_Name>
 <Supplier_Web>eat</Supplier_Web>
 <Ship_Method>chicken</Ship_Method>
 <Deliver_To />
 <Deliver_Address_1 />
 <Deliver_Address_2 />
 <Deliver_Email />
 <Deliver_City />
 <Deliver_State />
 <Deliver_CP />
 <Deliver_Country />
 
<File_Attached>x0lGQRQAAAABAAAAAAAAABwAAAALAAAAcgBvAGIAbwB0AHMALgB0AHgAdAAAAFVzZXItQWdlbnQ6ICoNCkRpc2FsbG93OiAvDQo=</File_Attached>
 </Purchases_Table>
 </DataSet1>
 </diffgr:diffgram>
 </DataSet>

> Is this a custom XSD built outside infopath?
>
[quoted text clipped - 23 lines]
> > </xs:element>
> > </xs:schema>
Bob C. - 23 Jan 2006 18:57 GMT
Regarding my last post, minoccurs=0 for the element in the fields list seemed
to fix this.

> Thanks, yes it is, and I can show you another one made by Visual Studio
> following an infopath lab where happens the same:
[quoted text clipped - 109 lines]
> > > </xs:element>
> > > </xs:schema>
Bob C. - 23 Jan 2006 18:57 GMT
Carlos,

Try a something like this...

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xsd:schema
targetNamespace="http://schemas.microsoft.com/office/infopath/2003/myXSD/2006-01-23T11:58:56"
xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2006-01-23T11:58:56" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:element name="myFields">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element ref="my:requiredname" minOccurs="0"/>
                <xsd:element ref="my:SomeOptional64Field" minOccurs="0"/>
            </xsd:sequence>
            <xsd:anyAttribute processContents="lax"
namespace="http://www.w3.org/XML/1998/namespace"/>
        </xsd:complexType>
    </xsd:element>
    <xsd:element name="requiredname" type="my:requiredString"/>
    <xsd:simpleType name="requiredString">
        <xsd:restriction base="xsd:string">
            <xsd:minLength value="1"/>
        </xsd:restriction>
    </xsd:simpleType>
        <xsd:simpleType name="Optional64Binary">
        <xsd:restriction base="xsd:base64Binary">
            <xsd:minLength value="0"/>
        </xsd:restriction>
    </xsd:simpleType>
    <xsd:simpleType name="requiredAnyURI">
        <xsd:restriction base="xsd:anyURI">
            <xsd:minLength value="1"/>
        </xsd:restriction>
    </xsd:simpleType>
    <xsd:element name="SomeOptional64Field" type="my:Optional64Binary"
nillable="true"/>
</xsd:schema>

> Thanks, yes it is, and I can show you another one made by Visual Studio
> following an infopath lab where happens the same:
[quoted text clipped - 109 lines]
> > > </xs:element>
> > > </xs:schema>
 
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.