AnsweredAssumed Answered

GFN & GTN Custom Function Question

Question asked by mikeo'neil on Dec 10, 2017
Latest reply on Dec 11, 2017 by mikeo'neil

I have two questions, one is concerning the syntax of the below ExecuteSQL statements. I am trying to implement the Custom Functions from FileMaker Hacks site (GFN). The other pertains to the GTN Custom Function.

 

I am trying display records according to a work shift (Field: = Shift and is Text).

 

This does not display correctly in the Chart. It is the X Axis statement calculation.

 

1)  ExecuteSQL ( "SELECT DISTINCT ("& GFN (PT_Outcome::Shift) & ")

 

2)  FROM Pt_Outcome

 

3)  GROUP BY ("& GFN ( PT_Outcome::Shift ) &") "; "" ; "" )

 

When testing this, Line # 3 above, when the GFN was added, I lost the desired display by having the records displayed by work shift.

 

This below statement displays as desired

 

1)  ExecuteSQL ( "SELECT DISTINCT ("& GFN (PT_Outcome::Shift) & ")

 

2)  FROM Pt_Outcome

 

3)  GROUP BY Shift "; "" ; "" )

 

What am I not doing correctly above?

 

Second part/question. This concerns the use of the Custom Function GTN from FileMaker Hacks web site on ExecuteSQL. When using the Custom Function GTN in the above statement example.

 

How would I implement the GTN function since I am not accessing any particular field (line 2 of second calculation)?

 

Thanks-Mike

Outcomes