Documentation on Filter Expression for web services

  • 1
  • Question
  • Updated 3 years ago
Hi, Is there any documentation available on the filterExpression options available within the web services? I am trying to get a list of users within a department (through /services/UserListService1.svc/GetData) using the API help service, but haven't figured out how to use the help service to set the left expression, right expression, filter definition uri, etc. to return the list. Thanks, Nathaniel

(Originally posted by nathanielolson)
Photo of Archived Post

Archived Post, Official Rep

  • 2132 Posts
  • 5 Reply Likes

Posted 3 years ago

  • 1
Photo of Archived Post

Archived Post, Official Rep

  • 2132 Posts
  • 5 Reply Likes
Hi,

Thank you for using Replicon Community.

From your query, it looks like you are on Gen-3, if yes I would like to inform you that Gen-3 uses Web Services and not API.
To get details of all the  available filters you can use https://na2.replicon.com/companykey/s...

In the above link, please change companykey to your company name which you use to log into Replicon.

Below given is a sample query of timesheetlistservice, which you could use as a reference. The logic to get the list of users is similar to the below query.

   {
  "page": "1",
  "pagesize": "10",
  "columnUris": [
    "urn:replicon:timesheet-list-column:due-date"
  ],
  "sort": [],
  "filterExpression": {
    "leftExpression": {
      "leftExpression": null,
      "operatorUri": null,
      "rightExpression": null,
      "value": null,
      "filterDefinitionUri": "urn:replicon:timesheet-list-filter:due-date"
    },
    "operatorUri": "urn:replicon:filter-operator:in",
    "rightExpression": {
      "leftExpression": null,
      "operatorUri": "urn:replicon:filter-operator:in",
      "rightExpression": null,
      "value": {
        "uri": null,
        "uris": [],
        "bool": null,
        "date": null,
        "money": null,
        "number": null,
        "text": null,
        "time": null,
        "calendarDayDurationValue": null,
        "workdayDurationValue": null,
        "dateRange": {
          "startDate": {
            "year": 2014,
            "month": 3,
            "day": 16
          },
          "endDate": null,
          "relativeDateRangeUri": null,
          "relativeDateRangeAsOfDate": null
        }
      },
      "filterDefinitionUri": null
    },
    "value": null,
    "filterDefinitionUri": null
  }
}

 
Thanks



(Originally posted by Lingaraj Dharwad)
Photo of Archived Post

Archived Post, Official Rep

  • 2132 Posts
  • 5 Reply Likes
Is there documentation on the filterExpress that is used within the web services? When I use the /services/UserListService1.svc/help/test/GetData service and try to use the Fields tab to return users in a department, it looks like I need to fill in th

(Originally posted by nathanielolson)
Photo of Archived Post

Archived Post, Official Rep

  • 2132 Posts
  • 5 Reply Likes
I have found out how to return all users within a department, but I am still not seeing what I think is consistent behavior from what I put in the filter expression. This is probably because I have not figured out what each part of the filter expression should/can contain. Some additional documentation would be very helpful. Here is what I used when calling the /services/UserListService1.svc/GetData web service. { "page": "1", "pagesize": "100", "columnUris": [ "urn:replicon:user-list-column:email-address", "urn:replicon:user-list-column:department", "urn:replicon:user-list-column:user" ], "sort": [], "filterExpression": { "leftExpression": { "filterDefinitionUri": "urn:replicon:user-list-filter:department" }, "operatorUri": "urn:replicon:filter-operator:equal", "rightExpression": { "value": { "uri": "urn:replicon-tenant:intelligent-in-sites-g3-trial:department:2" } } } }

(Originally posted by nathanielolson)
Photo of Archived Post

Archived Post, Official Rep

  • 2132 Posts
  • 5 Reply Likes
So there is another example in the forums...here is a filterExpression to retrieve all open timesheets for a given user. There are two conditions and'ed together in this expression. "filterExpression": { "leftExpression": { "leftExpression": { "filterDefinitionUri": "urn:replicon:timesheet-list-filter:approval-status" }, "operatorUri": "urn:replicon:filter-operator:equal", "rightExpression": { "value": { "uri": "urn:replicon:approval-status:open" } }, "value": null, "filterDefinitionUri": null }, "operatorUri": "urn:replicon:filter-operator:and", "rightExpression": { "leftExpression": { "filterDefinitionUri": "urn:replicon:timesheet-list-filter:timesheet-owner" }, "operatorUri": "urn:replicon:filter-operator:equal", "rightExpression": { "value": { "uri": "urn:replicon-tenant:intelligent-in-sites-g3-trial:user:2" } } } }

(Originally posted by nathanielolson)