Jahia in English > Validate data from...

0 (0 Good)
0 (0 Bad)

Validate data from a container

by  rmarquez »  2011/06/07 18:31

Hello everyone,

Is it possible to traverse a cantainer, then validate the content of a particular field ?

I need to verify the existence of a value in a container to update it already exists or create it if this does not exists.

Regards,

Rafael M?�rquez
  • Validate data from a container
    2011/06/07 18:31

    rmarquez Hello everyone, <br/><br/>Is it possible to traverse a cantainer, then validate the content of a particular field ?<br/><br/> I need to verify the existence of a value in a container to update it already exists or create it if this does not exists.<br/><br/>Regards,<br/><br/>Rafael M?�rquez

  • Number of messages  7
    Registration date Jun 7, 2011
    0 (0 Good)
    0 (0 Bad)

    Re: Validate data from a container

    by  shyrkov »  2011/06/07 18:31

    Hello Rafael,

    could you please precise your requirements?

    Would it be enough for you to get the field, like:
    [code:32upcmgh]
    JahiaField myField = container/1
    [/code:32upcmgh]
    and test its value or would you need more complex case?

    Would you like to just provide a default value for a field? In most cases you could use content definitions (CND file) to do it or use an event listener.

    Kind regards
    Sergiy
  • Re: Validate data from a container
    2011/06/07 18:31

    shyrkov Hello Rafael,<br/><br/>could you please precise your requirements?<br/><br/>Would it be enough for you to get the field, like:<br/>[code:32upcmgh]<br/>JahiaField myField = container/1<br/>[/code:32upcmgh]<br/>and test its value or would you need more complex case?<br/><br/>Would you like to just provide a default value for a field? In most cases you could use content definitions (CND file) to do it or use an event listener.<br/><br/>Kind regards<br/>Sergiy

  • Number of messages  407
    Registration date Jun 7, 2011
    0 (0 Good)
    0 (0 Bad)

    Re: Validate data from a container

    by  rmarquez »  2011/06/07 18:31

    Hello Sergiy,

    Suppose that the fields are loaded from the container of data through a sql query when the query is run again creates a new container duplicating the information. What it's needed is that before storing the data in the container, we need to check if that data already exists in any container.

    Thanks in advanced. :)

    --
    Regards,
    Rafael M?�rquez
  • Re: Validate data from a container
    2011/06/07 18:31

    rmarquez Hello Sergiy, <br/><br/>Suppose that the fields are loaded from the container of data through a sql query when the query is run again creates a new container duplicating the information. What it's needed is that before storing the data in the container, we need to check if that data already exists in any container.<br/><br/>Thanks in advanced. <!-- s:) --><img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile" /><!-- s:) --> <br/><br/>--<br/>Regards,<br/>Rafael M?�rquez

  • Number of messages  7
    Registration date Jun 7, 2011
    Contact
    Share
    Feedback

    Get in touch

    Whether you are a current user or if you are just evaluating Jahia, we are here to help.

    Contact us

    Share this page