Skip to main content
Known Participant
Apr 8, 2021 5:09 PM UTC
Question

How to query data in ER applying function on a specific field

Hi,

I was wondering if it is possible to query some data with an ER applying function on a specific field ?

I would like to do something like this (of course, "function" attribute does not exist) :

a!queryFilter(
  field: "end_date",
  function: "month",  /* month(end_date) */
  operator: "<=",
  value: 10
),

Of course, I would like to avoid to have to create an intermediate view or stored procedure... and avoid to loop over each line of my data to make the comparison.

Is there a simple solution ?

Regards 

3 replies

stefanhelzle0001
Brainy
Apr 8, 2021 6:19 PM UTC

No, this is not possible and you already listed available options.

csteward
Brainy
Apr 8, 2021 6:26 PM UTC

As Stefan notes, this is not possible within Appian and you would do so with a view utilizing DB functions such as (MSSQL):

SELECT DATEPART(Day,EOMONTH(getdate())) as 'end_date'

Known Participant
Apr 8, 2021 6:56 PM UTC

Thank you Stefan, Chris... 
We can always dream ;-)