Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Set field as mandatory

13 views
Skip to first unread message

joanacarvalho

unread,
Nov 30, 2009, 9:14:07 AM11/30/09
to
Hi,
I'm saving a datawindow result set in a XML file (export). I
would like to define some elements (or fields) as mandatory.

I get this:
<xsd:element name="Name" type="xsd:string" />

I would like to know how can I define an element as
mandatory in the datawindow, and get the following result:

<xsd:element name="Name" type="xsd:string" nillable="false"
minOccurs="1" maxOccurs="1" />

Best regards,
Joana Carvalho

Paul Murray

unread,
Nov 30, 2009, 4:13:17 PM11/30/09
to
Hi Joana,

Did you try changing the properties of the field in the datawindow painter
(on the Edit tab, check the box next to 'Required') to required?

Paul


<Joana Carvalho> wrote in message
news:4b13d32f.7b6...@sybase.com...

joanacarvalho

unread,
Dec 1, 2009, 5:15:03 AM12/1/09
to
Hi Paul,
Yes I tried it. Maybe I'm not selecting the correct XML
options?
Regards,
Joana

Paul Murray

unread,
Dec 1, 2009, 3:48:49 PM12/1/09
to
Joana,

I am somewhat green in this area. Can I ask you what you are trying to
achieve? It seems like you are trying to create a schema and or web
service? Would not creating a webservice target (I use PB 11.2) generate a
WSDL that specificies what is required and what is not?

If you are simply saving data in XML format, the datawindow itself should
enforce what is required befor you invoke the save, no?

Paul


<Joana Carvalho> wrote in message

news:4b14eca7.438...@sybase.com...

joanacarvalho

unread,
Jan 7, 2010, 3:07:17 AM1/7/10
to
Hi Paul,
My objective is to get an xml file with the schema and the
rows.
I have something like this:
- <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="pf_position_openarea" type="xs:string"
/>
<xs:element name="pf_position_opendate" type="xs:dateTime"
/>
<xs:element name="vessels_cal_sdwt" type="xs:double" />
<xs:element name="vessels_cal_cbm" type="xs:int" />
<xs:element name="area_area_name" type="xs:string" />
</xs:schema>
Apart of the field type I would like to join the information
mandatory=yes/no.
I will try to do some more testing.
Best regards,
Joana Carvalho
0 new messages