1 Reply Latest reply on Jul 18, 2016 9:22 AM by Johan Hedman

    Get Count and the Data from ExecuteSQL command


      Hi there


      Not sure if this is possible to work in the way I'm thinking.  I need to select some data as a virtual list and then split it out as described in the Filemaker training series manual (advaced) 2013, which is a routine I've used previously to good effect.


      I'm wondering if there's a way you can tailor the rows created on the destination table to be equal to the number of results you've gathered from the ExectureSQL command?  The training series points towards a set number of rows.  I'm using a simple piece of code to start with just to test it out:


      ExecuteSQL ( "


      Select ''|| CustID_FK, P1Perc from Warehouse

      where P1Perc is not null


      Order by CustID_FK







      As you can see, this is pulling from a warehouse which is always flexing with regard to the amount of available data, so to have a static table length as per the training series manual puts a limit on things which I want to future proof.


      I'm thinking about placing the (SQL) foundcount result into a variable and looping up the required empty records from there.  The table with the new records will be used for charting later on and then dropped until required again.


      Any help greatly appreciated, thanks in advance.