Visual Builder

Get Involved. Join the Conversation.

Topic

    Jaeyshree Kumaran
    Filter criteria $or operator not workingAnswered
    Topic posted March 17, 2019 by Jaeyshree KumaranRed Ribbon: 250+ Points, tagged Action Flows, Business Objects, Layout, Process, REST, Services, Stage / Publish / DevOps, UI, Validation, Web 
    163 Views, 4 Comments
    Title:
    Filter criteria $or operator not working
    Summary:
    Rest endpoint filter criteria with $or operator doesnt work
    Content:

    I am trying to filter REST endpoint of BO. I am successful when there is only one criteria.

    But fail when the same filter is with 2 criteria with an $or operator. It works well with $and operator. 

    CODE:

    {
     "filter": {
      "op": "$or",
      "criteria": [
       {
        "value": "{{ $chain.variables.selectedCollection }}",
        "op": "$eq",
        "attribute": "collection"
       },
       {
        "value": "{{ $application.variables.currentDate }}",
        "op": "$ge",
        "attribute": "endDate"
       }
      ]
     }
    }

    Best Comment

    Shay Shmeltzer

    Is it failing specifically when you leave one of the values empty? Or does it also fail when you have values in both criteria?

    Comment

     

    • Subba Bhamidipati

      You can use the steps mentioned here http://andrejusb.blogspot.com/2019/01/search-form-in-oracle-visual-builder.html

      It worked for me. 

       

      Thanks,

      Subba

    • John Ceccarelli

      syntax of filterCriterion looks right. are you sure that second expression works if used by itself?

    • Shay Shmeltzer

      Is it failing specifically when you leave one of the values empty? Or does it also fail when you have values in both criteria?

      • Jaeyshree Kumaran

        It fails when we have null values.I followed this blog -- http://andrejusb.blogspot.com/2019/01/search-form-in-oracle-visual-builder.html for null values and am getting the response.