Not really sure if this topic should be a new feature request or a bug report..
I'm trying to convert an existing sql-QMquery into an NAB-app,
as you know, when launching an QMQRY, a user gets prompted for the values of the "&" fields... in my case a from-to date.. (user needs to enter f.e "2018-01-01'' (with the quotes included... users tend to mistype, or not understand how to enter the values.. Therefore, i wanted to convert this one into a Nitro App, in order to allow a user to filter on the more userfriendly calender fields.
i could create my Datasource, and wanted to create the Grid Widget, however when i want to specify filter fields, i can only select fields from the basic sql files .. (not those from the WITH)
is there a solution to this??
the existing query :
I'm trying to convert an existing sql-QMquery into an NAB-app,
as you know, when launching an QMQRY, a user gets prompted for the values of the "&" fields... in my case a from-to date.. (user needs to enter f.e "2018-01-01'' (with the quotes included... users tend to mistype, or not understand how to enter the values.. Therefore, i wanted to convert this one into a Nitro App, in order to allow a user to filter on the more userfriendly calender fields.
i could create my Datasource, and wanted to create the Grid Widget, however when i want to specify filter fields, i can only select fields from the basic sql files .. (not those from the WITH)
is there a solution to this??
the existing query :
PHP Code:
WITH wpl (Wntool, wnartk, wnprod, wqamag, wdtrlg_F, wdtrlf_T,
wnmach, Log) as
(SELECT Plntool, Plnartk, plnprod,
decimal(max(plqatop), 11, 0),
max(pldpstr),
max(pldpein),
max(plnmach), 'LOG'
FROM cohplpf
WHERE plqatop<> 0 and
pldpstr between &ALF_DATEFROM_JJJJ_MM_DD and
&ALF_DATETILL_JJJJ_MM_DD
GROUP BY plntool, plnartk, plnprod
Union
Select PoNtool, Ponartk, PoNprod, PoQatop, PoDpstr, PoDpein,
PoNmach, 'ACT'
From Cohpopf exception join CoHplpf on
Plnprod = Ponprod
Where podpstr between &ALF_DATEFROMJJJJ_MM_DD and
&ALF_DATETILL_JJJJ_MM_DD),
Waf (W2Nartk, W2Qty) as
(Select Afnartk, decimal(sum(AfQafrp-AfQafrl), 9, 0)
From Cohafpf
Group By Afnartk
Having Sum(AfQafrp - AfQafrl) > 0)
Select wpl.*, W2Qty as AfroepHvh
FROM Wpl INNER JOIN COBARPF on
ARNARTK = WNARTK AND ARSTYPR <> 'P'
Left outer join Waf on
W2Nartk = WNartk
order by Wntool, Wnartk, Wdtrlf_T
Comment