is it possible to use relative filters like last m...
# suitescript
r
is it possible to use relative filters like last month, today, etc. in a scripted search?
u
Yes
r
is there an enum? i can't find it
make the search in the UI
and export it
r
of course. thanks
@Fadi Elsmaily
u
but it looks like this
Copy code
["trandate", "onorafter", "today"],
r
they really ought to publish an enum.
✔️ 2
f
So it's not possible to change the date ranges or a filter thru the get request ?
r
it is. depending on your needs, this might be easier tho.
no params coming in, was the idea.
f
Mostly looking to programtically export certain data to our data warehouse
r
using something like "last month's posting period", if it's possible, means you don't need to send in filter parameters.
f
Yeah that seems reasonable
u
you can create the search dynamically how ever you want. You also have the option to use relative filters
r
@_nikhilpalli fadi was asking about sending filter parameters to a restlet. see # general
a
@reptar @Fadi Elsmaily You can have a restlet that can accept a filters and modify/update a search and use those filters... what is the issue you are having?
r
fadi asked if that was possible. i said it is, but using relative filters may be a better option.
f
I can't find any documentation on how to do that @alien4u
So I want even sure it was possible
r
node example sending parameters (JSON) to a NS restlet
a
@Fadi Elsmaily There is no specific documentation for specific use cases, there is restlet documentation(you need to know and understand how it works) and there is searches documentation(you also need to understand and know how it works), when you combine both, you will be able to modify your restlet in such way that will modify a search as you need.