Visual Builder

Get Involved. Join the Conversation.

Topic

    Vishnu Mishra
    q Variable with Filter CriteriaAnswered
    Topic posted September 20, 2019 by Vishnu MishraRed Ribbon: 250+ Points 
    28 Views, 2 Comments
    Title:
    q Variable with Filter Criteria
    Summary:
    q Variable & Filter Criteria don't work when used together
    Content:

    Hi,

    I have an application where I am displaying data from my Sales Cloud in a table. I am using the REST webservice and querying the data using the 'q' variable. Something like "?q=AccountPartyId=<Some Value>." This works like a charm but when I add a filter criteria to the table, the filter criteria does not work at all. I still get the relevant data as defined in my 'q' variable but filter criteria doesn't do anything. If I remove the 'q' parameter, the criteria works properly. So, I can't seem to figure out how to make both of them work together.

    Here' some information:
    My q variable is defined as: "AccountPartyId=" + $application.variables.accountPartyId

    My filter criteria is defined as: {
     "criteria": [
      {
       "attribute": "SrNumber",
       "op": "$eq"
      }
     ]
    }

    I am getting the value for the criteria from an input text using: {{ $variables.serviceRequestsListSDP.filterCriterion.criteria[0].value }}

    The GET REST query returns 200. Here's the entire URL that is being fired: <our hostname>.oraclecloud.com/crmRestApi/resources/11.13.18.05/serviceRequests?links=self&q=AccountPartyId%3D300000001932060&q=SrNumber%20%3D%20%270000002013%27&limit=25&offset=0&fields=SrNumber%2CTitle%2CSrId%2CCreationDate%2CReportedByPartyName%2CStatusCdMeaning%2CName_c%2CCompany_c%2CEmail_c%2CPhone_c

    Regards,
    Vishnu

    Best Comment

    Shay Shmeltzer

    Define a compound view criteria that includes both restrictions (adding the "AccountPartyId=" + $application.variables.accountPartyId) as another criteria.

    Complex Queries in Visual Builder

    Filtering Data Providers with Compound Conditions in Visual Builder

    Comment