Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    validator.applyWhen / DSRequestModifier syntax and inSet and dates

    Hi Isomorphic,

    can you show and best also document the inSet version of this slightly modified sample code here in the validator.applyWhen docs:
    Code:
           <validator type="integerRange" min="0" max="100">
            <applyWhen operator="or">
              <criteria>
                <criterion fieldName="gender" operator="equals" value="male"/>
                <criterion fieldName="gender" operator="equals" value="female"/>
              </criteria>
             </applyWhen>
          </validator>
    AdvancedCriteria definition in DSRequestModifier docs is different (with e.g. _constructor="AdvancedCriteria" and different casing for criterion / Criterion:
    Code:
    <criteria _constructor="AdvancedCriteria" operator="or">
    <criteria>
                       <Criterion fieldName="lifeSpan" operator="greaterThan" value="10" />
                       <Criterion fieldName="scientificName" operator="contains" value="Octopus" />
    </criteria>
    </criteria>
    Is this on purpose?
    Can you also show an example using dates, e.g. nextShipment >= 2019-12-31 or even datetimes?

    It's not easy to guess what is expected here in all these cases.

    Thank you & Best regards
    Blama
    Last edited by Blama; 20 Mar 2019, 01:53. Reason: formatted

    #2
    The rules are uniform with our XML serialization rules. So for a multiple/array valued attribute you use what we've show in the DSField.multiple docs.

    Date serialization is covered in multiple places in the docs already including the Date Format and Storage overview, DataSource.xmlSerialize() docs and RestDataSource.

    We'll double-check on the "criterion" capitalization - both are definitely accepted, but one may be preferred.

    Comment

    Working...
    X