0
votes

I'm learning Oracle Apex, my company uses Apex 4, and I have a very basic question.

For example, I have to show a form that show this fields

   SELECT r.TXT_SIGLA, ANO_REF, MES_REF, NUM_QUANTIDADE VL, NUM_UNIDADE
   FROM planejamento.PE_PARAMETRO_RESULTADO r
   Join planejamento.pe_Parametro p ON p.TXT_SIGLA = r.TXT_SIGLA
   WHERE ANO_REF = :ANO_REF AND MES_REF = :MES_REF
   AND r.TXT_SIGLA IN (:P15_SIGLA)

but when I'm creating forms I just see how show data from one table... How can I show the fields from this query in a form?

1
Why do you need a form (which only shows one record at a time)? Why not use a report instead? Alternatively, if it must be editable, you might consider a Tabular Form. - Jeffrey Kemp
couse the data comes from diferent tables...what i did is that each item ..have a differente sql...solve to me...but i dont know if its the best solution. - tecnocrata
Of course it comes from different tables - your example query takes data from two of them, for example. Why can't you put these queries into a report? - Jeffrey Kemp
hey Jeffrey, thanks for your reply. Comes out that i was with a little misconception from the oracle apex. The solution that i use consists in: BEFORE the user get in the form i pick the attributes via href - tecnocrata

1 Answers

0
votes

to get the attributes to populate the form, i get them in a previous page via href

...

     CASE
            WHEN cod_tipo_calculo = 'P' THEN '<a href="f?p=161:12:112652092299890::NO::P12_NUM_SEQ:'||TO_CHAR( ROUND( AVG( DECODE( MES_REF, 2, VL, NULL )), 2 ))|| '"/>' || TO_CHAR( ROUND( AVG( DECODE( MES_REF, 2, VL, NULL )), 2 ))|| '</a>'
            ELSE '<a href="f?p=161:12:&SESSION.::NO::P12_NUM_VALOR,P12_TXT_SIGLA,P12_ANO_REF,P12_MES_REF:'||TO_CHAR( ROUND( AVG( DECODE( MES_REF, 2, VL, NULL )), 2 ))||','||TXT_SIGLA||','||ANO_REF||
                    '"/>' || TO_CHAR( ROUND( AVG( DECODE( MES_REF, 2, VL, NULL )), 2 ))|| '</a>'
        END fev

and then in the form, i get the following link:

..f?p=161:12:104315456273143::NO::P12_NUM_VALOR,P12_TXT_SIGLA,P12_ANO_REF,P12_MES_REF:23,NPAJ,2017