Event aquery_open_after
This event is used for representations, after the query URL has been analyzed. It allows the development partner to open additional tables. This query URL has the following format:
.../sdata/$$prod/FOLDER/CLASS?representation=REPRES&where='ID between "a" and "f"'&disp_summary=true
In this query, the class is given by CLASS, the representation by REPRES, a where condition has been given on the ID, and an additional parameter,disp_summary, has been set to true.
this
is not available.PQRY.QWHERE
gives the filtering conditions. Using the example URL format above, it would contain an ID between "A" and "F"
.DISP=func ASYRMAIN.PARVAL(ARCV,"disp_summary")
would fill the DISP variable with a "true" string.# This piece of code has to be called by Gosub on the AQUERY_DECODE_CRITERIA_AFTER event# Here, the class managed is an interface class# So we need to declare a "pseudo table" (that will be filled) with [LNK_] abbreviation.$AQUERY_OPEN_AFTER# Add a condition on ID fieldIf PQRY.QWHERE<>"" : PQRY.QWHERE -= 'and' : EndifPQRY.QWHERE -= 'ID gt ""'Local Char ID(20)(1..)Local Integer INT_VAL(1..)Local Date DATE_EVENT(1..)Local Char AMOUNT(1..)Gosub FILL_ARRAY : # The array is supposed to be filled here by computed data: # taking into account the PQRY.QWHERE conditions# A dedicated "Local file" syntax allowing to declare a "pseudo table"# that contains the values stored in an arrayLocal File (& Char IDKEY(20),& Integer INTEG,& Date DAT,& Decimal AMOUNT&) From Variable& ID,INT_VAL,DATE_EVENT,AMOUNT As [LNK_]Return