No announcement yet.
  • 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:
           <validator type="integerRange" min="0" max="100">
            <applyWhen operator="or">
                <criterion fieldName="gender" operator="equals" value="male"/>
                <criterion fieldName="gender" operator="equals" value="female"/>
    AdvancedCriteria definition in DSRequestModifier docs is different (with e.g. _constructor="AdvancedCriteria" and different casing for criterion / Criterion:
    <criteria _constructor="AdvancedCriteria" operator="or">
                       <Criterion fieldName="lifeSpan" operator="greaterThan" value="10" />
                       <Criterion fieldName="scientificName" operator="contains" value="Octopus" />
    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
    Last edited by Blama; 20 Mar 2019, 01:53. Reason: formatted

    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.