Donate Share

ServingXML

Subscribe

Different behaviour during field validation

  1. 2009-11-09 15:34:56 UTC

    I'm playing with validators. I need to have a different behaviour on some fields. Not throw an exception (discarding the record), but simply change to null the value of the field when input value doesn't match the pattern. How can I do this?

    Thanks

    Alberto

  2. 2009-11-10 05:26:58 UTC

    You don't need validators for that. You can do that inside an sx:choose, e.g.

      <sx:choose>
        <sx:when test="category='F'">
          <sx:modifyRecord>
            <sx:newField name="category" value=""/>
          </sx:modifyRecord>
        </sx:when>
      </sx:choose>
    

    You can use sx:choose wherever an sx:recordFilter is allowed.

    -- Daniel

< Previous | 1 | Next >

Add a Reply

This forum does not allow anonymous participation.

Log in to add a reply. Not registered? Create an account to participate and receive email updates when replies are posted to this topic.