| 
| Optional fields in GLA [message #83919] | Thu, 21 September 2006 16:51  |  | 
| Eclipse User  |  |  |  |  | Hi, I am using the GLA perspective in tptp 4.2 to develop a GLA rule-based
 adapter. If a given field is present, I wish to produce a corresponding
 extendedDataElement. If it is not present in a record the
 extendedDataElement should not be created at all.
 
 What do I need to do to prevent empty things like this:
 
 <extendedDataElements>
 <children name="result">
 </children>
 </extendedDataElements>
 
 I am playing around with "Required by parent" and "Child choice", but
 not getting what I want (ie, no extendedDataElements when given source
 field is not present).
 
 Thanks,
 chris
 |  |  |  | 
| 
| Re: Optional fields in GLA [message #83953 is a reply to message #83919] | Fri, 22 September 2006 07:27   |  | 
| Eclipse User  |  |  |  |  | Hi, In the meantime, I set 'name' attribute of the extendedDataElement to
 "Required by parent", remove the default value, and define a
 substitution rule for this 'name' attribute. If the rule does not match
 the given pattern, name is 'empty; and the containing
 extendedDataElement is not created.
 
 This works - I wonder, however, if this is the best way to do it.
 
 Thanks, chris
 
 
 
 
 Chris Giblin wrote:
 > Hi,
 > I am using the GLA perspective in tptp 4.2 to develop a GLA rule-based
 > adapter. If a given field is present, I wish to produce a corresponding
 > extendedDataElement. If it is not present in a record the
 > extendedDataElement should not be created at all.
 >
 > What do I need to do to prevent empty things like this:
 >
 >  <extendedDataElements>
 >   <children name="result">
 >   </children>
 >  </extendedDataElements>
 >
 > I am playing around with "Required by parent" and "Child choice", but
 > not getting what I want (ie, no extendedDataElements when given source
 > field is not present).
 >
 > Thanks,
 > chris
 >
 |  |  |  | 
| 
| Re: Optional fields in GLA [message #83967 is a reply to message #83953] | Fri, 22 September 2006 09:54  |  | 
| Eclipse User  |  |  |  |  | Originally posted by: cindyjin.ca.ibm.com 
 Hi Chris:
 
 I think use "Required by parent " attribute is a correct way to do it.
 You can check the Required by parent check box of 'name','type' or
 'value' attribute, then create substitution rule to set an invalid value
 to that attribute when the given field in record is not present. You can
 check Common Base Event format specification
 http://www.eclipse.org/tptp/platform/documents/resources/cbe 101spec/CommonBaseEvent_SituationData_V1.0.1.pdf,
 to see what are valid values for these attributes.
 
 Bests
 Cindy
 
 Chris Giblin wrote:
 > Hi,
 > In the meantime, I set 'name' attribute of the extendedDataElement to
 > "Required by parent", remove the default value, and define a
 > substitution rule for this 'name' attribute. If the rule does not match
 > the given pattern, name is 'empty; and the containing
 > extendedDataElement is not created.
 >
 > This works - I wonder, however, if this is the best way to do it.
 >
 > Thanks, chris
 >
 >
 >
 >
 > Chris Giblin wrote:
 >> Hi,
 >> I am using the GLA perspective in tptp 4.2 to develop a GLA rule-based
 >> adapter. If a given field is present, I wish to produce a
 >> corresponding extendedDataElement. If it is not present in a record
 >> the extendedDataElement should not be created at all.
 >>
 >> What do I need to do to prevent empty things like this:
 >>
 >>  <extendedDataElements>
 >>   <children name="result">
 >>   </children>
 >>  </extendedDataElements>
 >>
 >> I am playing around with "Required by parent" and "Child choice", but
 >> not getting what I want (ie, no extendedDataElements when given source
 >> field is not present).
 >>
 >> Thanks,
 >> chris
 >>
 |  |  |  | 
Powered by 
FUDForum. Page generated in 0.03523 seconds