New posts are disabled while we improve the user experience.

You can browse the site, or for urgent issues, raise a query at MyAccount.

question

Upvotes
Accepted
1 2 2 1

What is the best way to GET LAST Folder number, respecting the configuration for this field?

In my case, I'm inserting a case into API, but I need to respect the configurations for Folder Number field, like respect the mask "Proc - DDDDDDD". Any idea?

legal-one
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
Upvotes
Accepted
36 0 0 1

Unfortunately, we don't have an endpoint for suggesting the next folder name like in the Web Application. It should be requested to "Legal One Product Team" so that they can analyze that and hopefully include it on the roadmap.

As an alternative you could make a request for getting the last folder by applying the following constraints:

  • Filter the records that have their "folder" with the desired/configured format: $filter=startswith(folder,'Proc - ')
  • Order the records by Id descending: $orderby=id desc
  • Select only the folder field: $select=folder
  • Get only the top record: $top=1

The request would look like this:

https://api.thomsonreuters.com/legalone/v1/api/rest/lawsuits?$filter=startswith(folder,'Proc - ')&$orderby=id desc&$select=folder&$top=1


Reference: http://www.odata.org/getting-started/basic-tutorial

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.