AnsweredAssumed Answered

How can I keep multi-select children from being available for filtering, sorting and selecting?

Question asked by amelia.ross on Nov 20, 2013
Latest reply on Nov 26, 2013 by jplater
In our schema, we have some elements which are multi-value, this is represented in our generated schema with a complex type for the multi value elements, with a sequence of the child node which holds the values. This is an basic example of how it would look if one of our objects had one id field, and one multi value field, with our initial schema generation:
 
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
                <xs:complexType name="intMultiValue">
                                <xs:sequence>
                                                <xs:element maxOccurs="unbounded" minOccurs="0" name="value" type="xs:int" />
                                </xs:sequence>
                </xs:complexType>
                <xs:complexType name="Object">
                                <xs:sequence>
                                                <xs:element maxOccurs="1" minOccurs="0" name="id" type="xs:int" />
                                                <xs:element maxOccurs="1" minOccurs="0" name="multiValueField" type="intMultiValue" />
                                </xs:sequence>
                </xs:complexType>
                <xs:element name="Data" type="Object"/>
</xs:schema>
 
This basic schema worked fine to generate profiles representing our data, but it also would show the “<value>” element as a child to any multi value fields as filterable, sortable, and selectable. Since the element name that needs to be used in filter, sorts, and selections should be the actual multi value field name, I figured we could remove them by using a fieldSpec annotation, like this:
 
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
                <xs:complexType name="intMultiValue">
                                <xs:sequence>
                                                <xs:element maxOccurs="unbounded" minOccurs="0" name="value" type="xs:int">
                                                                <xs:annotation>
                                                                                <xs:appinfo>
                                                                                                <ba:fieldSpec ignoreForFilters="true" ignoreForSelection="true" ignoreForSorts="true" xmlns:ba="http://www.boomi.com/connector/annotation"/>
                                                                                </xs:appinfo>
                                                                </xs:annotation>
                                                </xs:element>
                                </xs:sequence>
                </xs:complexType>
                <xs:complexType name="Object">
                                <xs:sequence>
                                                <xs:element maxOccurs="1" minOccurs="0" name="id" type="xs:int" />
                                                <xs:element maxOccurs="1" minOccurs="0" name="multiValueField" type="intMultiValue" />
                                </xs:sequence>
                </xs:complexType>
                <xs:element name="Data" type="Object"/>
</xs:schema>
 
And that did work to hide the child <value> element, but it also hid the parent element from filtering, sorting, and selecting.
 
I tried to re-enable the parent by setting the multi value type as a supportedType for the desired operators in the descriptor file, but this seemed to reenable both parent and child elements, so I’m guessing it maybe overrides any fieldSpec.
 
Given all that, is there any way to achieve having the parent element in this case show up, but have the child element be hidden from filtering, sorting, and selecting?
 
If not, we can leave them enabled and just be sure to skip over any usage of the value portion in our query building code, but it would be a bit cleaner if we could keep them hidden.
 
Thanks
 

Outcomes