Discussions

  • 1.  Pipelines Advanced Query

    Posted 08-30-2021 09:49
    Edited by Daniel Johnson 08-30-2021 10:48
    Hi All,

    Does anyone know if I can use the '$' in the advanced query function to ask for the previous value of a field as a condition? I've tried:

    {$prev.10 .EX. 'Value'}
    {'$prev.10' .EX. 'Value'}
    {$prev10 .EX. 'Value'}
    {'$prev10' .EX. 'Value'}

    And none worked. I was assuming that since you could use it in the outputs that it could have been used in the advanced query step. Has anyone gotten this to work?

    (Updated at 10:47 AM EST to include missing 'prev' after '$'. Still not working.)

    Thanks,

    ------------------------------
    Daniel Johnson
    ------------------------------


  • 2.  RE: Pipelines Advanced Query

    Posted 08-30-2021 14:16
    Got some help from customer service on this one. Let's say field 10 is a text field called Status, then the correct syntax in the trigger query would be:

    {'{{a.$prev.status}}' .EX. 'Value'}

    I was told you have to use the written form of the field and not the field ID number.

    ------------------------------
    Daniel Johnson
    ------------------------------



  • 3.  RE: Pipelines Advanced Query

    Posted 09-01-2021 11:27
    Turns out {'{{a.$prev.status}}' .EX. 'Value'} isn't capturing the previous value. I've got the pipeline to be triggered when that status field changes, and I want it only to trigger when the previous value in the status field equals Value. However, after further testing I'm finding that the pipeline is triggering whenever the status field changes and disregarding the advanced query. Is this because there's something wrong with the query? Any ideas?

    Thanks,

    ------------------------------
    Daniel Johnson
    ------------------------------



  • 4.  RE: Pipelines Advanced Query

    Posted 09-02-2021 09:31
    Another update:

    I was on with support yesterday afternoon and we replicated the issue, which appears to be that you can't use the $prev language in an expression, which is unfortunate. Below is an example of the issue. In this case, we added the query expression in a conditional step because we weren't able to see the expression evaluate in the trigger. You can clearly see the condition is evaluating to true, even though the two values on either side of the equals sign are different. A = B is true?


    Any ideas?


    ------------------------------
    Daniel Johnson
    ------------------------------