In the template Inquiry, there is already the action FILTRE (https://online-help.sagex3.com/erp/12/fr-fr/Content/MODEL/act_consultation.htm)
In the script CNSxxxSTD, the developpers should also add and action LIGNE, inside the loop of the query in order to fulfill specific fields in the table
in summary the script will look like
$LECTURE
If PROGSPE<>""
ACTION = "FILTRE" : Gosub ACTION From =PROGSPE
Endif
nolign=0
For [xxx]
nolign+=1
[M:XXX]=[F:XXX]
If PROGSPE<>""
ACTION = "LIGNE" : Gosub ACTION From =PROGSPE
Endif
Next
Return