Project

General

Profile

Feature #18456

Updated by Jan Haller 2 months ago

QFQ functions only take parameters from the RECORD-STORE. Every variable from the RECORD-STORE passed to the function will be made available inside the function. 
 In certain use cases, when the RECORD-STORE is not available for example, it would be useful to pass an actual value (like in a typical function) that can be used within the function. 
 Example from form element field modeSql: Example: FE.modeSql 
 The following code can not be put inside a QFQ function because '{{mef_bef_setting_name_uploadReviewFieldRepresentative:Y}}' can not be used as a parameter. It would first have to be saved into the RECORD-STORE which is not possible inside FE.modeSql. 
 <pre><code class="sql"> 
 {{ SELECT gr.value2 
     FROM Ggroup AS grP, Ggroup AS grC, Ggroup AS gr, BefApplication AS app, GroupMember AS gm 
     WHERE grP.reference = 'mef_bef_applicationType' 
       AND grP.id = grC.grId  
       AND grC.value = app.type  
       AND app.id = '{{id:R0}}'  
       AND gm.grId = grC.id  
       AND gm.xId = '{{mef_bef_setting_name_uploadReviewFieldRepresentative:Y}}'  
       AND gm.xId2 = gr.id 
 }} 
 </code></pre> 

Back