If condition Statement

Hi All,

Could you please tell me what is wrong with the following IF condition

if [ DOCUMENT_MODEL ] == "10000" {
      mutate { 
         replace => { "DOCUMENT_MODEL" => "INVOICE" }
      } 
}

Even though the DOCUMENT_MODEL is equal to 10000, it doesn't go to the replace.

Thanks

If DOCUMENT_MODEL is an integer then that would have to be

if [DOCUMENT_MODEL] == 10000 {

Note also that I removed the spaces inside the (if your field names really contain spaces then obviously you will need the spaces).

Hi @Badger,
Thank you so much.
Indeed the problem was spaces.
Regars

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.