Filter for multiple envelope custom_fields - docusignapi

We have added 2 required custom_fields to our Envelopes that we create through DocuSign.
Now we are trying to fetch these Envelopes and filter them by the value of said Custom fields.
This is working well if we are filtering for 1 value, like in this example:
https://demo.docusign.net/restapi/v2.1/accounts/ACCOUNT_ID_NUMBER/envelopes?status=sent&custom_field=FIELD1%3DVALUE1
Like I mentioned, this works, but we are struggeling to find a way to filter for 2 custom_fields.
We tried some of the usual approaches by using square brackets or using the 'AND' and 'OR' keywords between the filter queries, but none of them seem to be working.
Anyone has an Idea how this could be solved?

Unfortunately the product doesn't support this currently.
Therefore you'll need to make two API calls, one for each custom field. Then your application can compute the intersection of the response envelope ID sets.

Related

Acumatica REST API - StockItem - how to use multiple product id in request

I am using the Acumatica REST endpoint https://companyName/AcumaticaERP/entity/Default/6.00.001 in my application
I am using the URL https://companyName/AcumaticaERP/entity/Default/6.00.001/StockItem?$filter=InventoryID eq '123456'&$expand=WarehouseDetails to fetch info about a Product and to get complete warehouse details
My query is how to use multiple product id's in single request, so that to get info about multiple products in single request to Acumatica Erp REST Url.
You can either use a generic GET request in order to have a list of all the records in that entity, you can append a specific ID at the end to select a single entity or you can use filters in order to restrict that list.
you might want to take a look at the following article from the Acumatica Help section:
Parameters for Retrieving Records :
https://help-2018r2.acumatica.com/(W(3))/Help?ScreenId=ShowWiki&pageid=c5e2f36a-0971-4b33-b127-3c3fe14106ff
but basically you will need to use different condition than "eq" in order to match more value. Even though there is no "in" condition

How to make filters in queries optional

How to make a query filter bound to a request parameter inactive if the parameter is not present?
For example: I have a query MyQuery that can be accessed through the projection MyProjection. I add a filter to that query where I say that MyDate field should be equal to {Request.QueryString:MyDate}. I want URLs like ~/MyProjection?MyDate=2016-03-08 to filter content items by the given value, but the url ~/MyProjection to just not filter by that field. But this is not what happens: a condition gets added to the query anyway and it's of the form '[minimum DateTime value] < MyDate < [maximum DateTime value]'. This is not good because it will filter out fields with NULL values. If I try to do the same with a numeric field, it's even worse because it throws exceptions when the parameter is not present.
I know I can create a new query and projection to get different options, but that seems like an overkill - also, what if I wanted to create an advanced search form, it would have to target a single projection.
Is there an "official" way to do this? Or a workaround? Or is this simply not supported in Orchard?
I'm not aware of a way to do this out of the box. However, you could pretty easily create your own filter with the behavior you want by implementing IFilterProvider.
Take a look at the Orchard.Projections module. That's where you'll find many of the default query filters (including the date field filter you referenced). Your's will likely be even simpler if you only need to handle a specific case.
For a very simple example, checkout the Orchard.Tags module (look in the projections folder). The contents of this folder will give you pretty much all the boilerplate you'll need to get started creating your own. Just plug in your own logic.

OnDemandGrid column sorting isn't working with dstore/Rest and Django Rest Framework

I have created an OnDemandGrid but noticed that the column sorts weren't working on any column. The arrows are there and the screen refreshes, but it won't sort the columns in asc or desc order. I have even tried specifying for each column but it still doesn't work. Anybody having/had the same issue?
UPDATE: 6.16.15 - After trying sortParam suggestion:
Comment below explains. It appears to be doing the right thing... but still won't sort.
UPDATE 6.16.15 - 4:00pm
Apparently ANY type of filtering or sort doesn't work well with Django - trying to determine how set filtering where dojo can communicate to Django Rest or vice versa - so far haven't been able to find a setting on either side that works. Not only does column sort not work - creating a search field doesn't work, nor creating a sort button.
This is after changing to the ORDERING_PARAM in DJANGO settings.py to 'SORT'... for all intensive purposes this looks like it should work.
A quick search through the Django Rest Framework documentation reveals that it defaults to expecting an ordering query parameter to indicate which field should be sorted. The dstore/Request store (inherited by Rest) allows you to indicate the query parameter name that sends sort information, via sortParam.
Additionally, it appears that DRF's OrderingFilter indicates ascending sort with no prefix, and descending sort with -. dstore/Request defaults to expecting + and - as prefixes, but these can be overridden via ascendingPrefix and descendingPrefix.
So in your case, you'll want to include sortParam: 'ordering', ascendingPrefix: '' in the properties passed when you create your Rest store instance.
In general, when you run into store-related issues like this where the grid and backend don't seem to be making ends meet, this is the process you'll have to follow - find out what the server expects, find out what the client-side store implements, and see if it can be tweaked or needs to be customized.
UPDATE 6.17.15 -
Changing server side settings to match dojo/dgrid parameters -
REST_FRAMEWORK = {
'DEFAULT_PERMISSION_CLASSES': ('rest_framework.permissions.IsAdminUser',),
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.LimitOffsetPagination',
# 'PAGE_SIZE': 25,
'ORDERING_PARAM': 'sort'

Venues/SuggestCompletion doesn't give any results

I know for a fact that there are atleast 5-6 POI within the 50 mile radius in this area. However, I don't get any results on this query.
https://api.foursquare.com/v2/venues/suggestCompletion?ll=-44.67,167.92&query=milford&radius=50000
I see results when I try search api (it doesnt use query as mentioned in documentation):
https://api.foursquare.com/v2/venues/search?ll=-44.67,167.92&intent=checkin&query=milford&radius=50000
No results with intent match on the search query.
I really like the suggestcompletion api (compact). Any suggestion/input would be great?
Thanks!
The suggestcompletion endpoint is used to suggest venues whose names start with the provided query. The endpoint is used to provide autocomplete results for search input fields. It is not used as a general purpose venue search - you should use the /venues/search endpoint for this purpose.
looks like you have missed out the API version param. You need to denote it by adding this into your request :
&v=20150826
suggestCompletion is included into newer API released on 20150826 which differs from default one that not including suggestCompletion feature.

Expression Engine - passing multiple categories as URL segments

I'm trying to create a product filter with deep-linking capability. Essentially, I want the user to be able to filter my product list on multiple categories and have the URL reflect the filtering they've done.
So it would start as:
www.site.com/products/
My first level of category filtering already works. So I can use EE's regular handling of URL segments to get to my first level of filtering. For instance:
www.site.com/products/leatherthongs
Returns a filtered subset showing only a spectacular collection of leather thongs. But now I want the user to be able to filter on another category - color for instance. This is where stuff stops working.
EE's way of handling multiple categories inside templates (with ampersands or pipes) doesn't work in the URL:
www.site.com/products/leatherthongs&red
Nor does any variation that I've tried.
My next move is to create a simple raw PHP method that can capture regular querystring parameters and then inject them into the {entries} tag before rendering. Not very difficult, but quite ugly. I would love to know if there is a way to handle multiple categories in the URL natively.
Thanks for your time.
Have you considered using Low's Seg2Cat add-on? I'm not sure how complex you want to make this but it seems that you could specify something in your channel:entries loop like categories='{segment_2){if segment_3}|{segment_3_category_id}{/if}'
This exact syntax is untested but I have had success in the past with a similar solution.

Resources