Jump to content

Without Loop Script, can I create new table with records that are grouped by particular fields?


This topic is 2574 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Obviously, it is possible to export records that are grouped by particular fields.

But I have to import that exported records to create new table.

So it means if I'm making  it automated by the script, I'll need to do something like this below within script

 

Assuming there are 1000 records here, and there are 3 fields such as FirstName, Gender, and State

So something like this => Mike, Male, CA

 

1. sort by Gender field and State field for grouping

 

2. set a variable for export destination path.

 

3. export records (gropued byGender field and State field) to the variable above. Assuming it became 200 records for total after grouping  as result.

 

4. import the variable(exported records) to particular field.

 

Yes, I want grouped records within the same filemaker solution as new table.

 

Can I make this more sophisticated?

If I use MS Access, I can obtain grouped records within 10 seconds within a solution.

 

 

Link to comment
Share on other sites

 

 

Yes, I want grouped records within the same filemaker solution as new table.

 

 

Why?

Given that in FM all interaction with data in a table is through a layout based on a TO... this would not really get you anywhere useful.

And you'd now have duplicate data.

 

What purpose would this new table serve?  Perhaps there is a way that gives you the functionality that you are after without duplicating data.

Link to comment
Share on other sites

This topic is 2574 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Similar Content

    • By Stu412
      I'm preparing a sub summary report from a selection of records in my found data set.  The report needs to have a detailed, record by record section at the top part and below this, summaries of the remaining records.  The problem I'm facing based on the layout below is, because I need the records for Groups 3,4 and 5 in my found set in order to calculate their summarised results, they're appearing as detailed records because of the layout set up I'm currently using to allow details to show for Groups 1 and 2.
      I feel like I'm missing something very simple here, appreciate any help. Thanks in advance
      Group1
      DetailsRecord1
      DetailsRecord2
           Summary of Group1
      Group2
      DetailsRecord3
      DetailsRecord4
           Summary of Group2
      ----------------------------------------------------
      Group3 
           Summary of Group3 (No record details)
      Group4
           Summary of Group4 (No record details)
      Group5
           Summary of Group5 (No record details)
       
    • By Cabinetman
      This may not be the best way to do this OR describe the issue ....... but I feel like I'm ever so close.
      I can almost get the output but I have one section coming in as blank.
       
      Also I'm sorry for the length of this post. Just trying to give all the needed data .................... I hope.
       
      I'm exporting 4 records with 4 fields ... but only using 3 fields per line in the exported file..
      (Posted at the bottom is an example of the FM export data)
       
      My desired output is a tab delim. text file with headers such as this :
      sku    id    status Parent-SKU1     0123456789     Update Parent-SKU2     0123456789     Update Child-SKU1     0123456789     Update Child-SKU2     0123456789     Update Child-SKU3     0123456789     Update Child-SKU4     0123456789     Update Notice that there 2 unique Parent-SKUs : Parent-SKU1 Parent-SKU2 (these are in COL[1] for each row)
       
      and 4 unigue Child-SKUs : Child-SKU1 Child-SKU2 Child-SKU3 Child-SKU4 (these are in COL[2] for each row)
       
      I'm using this .... within the stylesheet  :
      <xsl:template match="/">             <!-- Header line, inserted only once per record set -->         <xsl:text>sku    id    status</xsl:text> <!-- End of Header --> <!-- Begin Parent SKUs --> <xsl:for-each select="xalan:distinct(fmp:FMPXMLRESULT/fmp:RESULTSET/fmp:ROW/fmp:COL[1]/fmp:DATA)">         <xsl:attribute name="(fmp:COL[1]/fmp:DATA)"><xsl:value-of select="current()"/></xsl:attribute>             <xsl:value-of select="fmp:FMPXMLRESULT/fmp:RESULTSET/fmp:ROW/fmp:COL[1]/fmp:DATA"/><xsl:text>   </xsl:text><xsl:value-of select="fmp:ROW/fmp:COL[3]/fmp:DATA"/><xsl:text>   </xsl:text><xsl:value-of select="fmp:ROW/fmp:COL[4]/fmp:DATA"/><xsl:value-of select="$newrecord"/>             <xsl:attribute name="(fmp:COL[1]/fmp:DATA)"><xsl:value-of select="fmp:COL[1]/fmp:DATA"/></xsl:attribute> </xsl:for-each> <!-- Begin Child SKUs -->         <xsl:for-each select="fmp:FMPXMLRESULT/fmp:RESULTSET/fmp:ROW">                 <xsl:value-of select="fmp:COL[2]/fmp:DATA"/><xsl:text>   </xsl:text><xsl:value-of select="fmp:COL[3]/fmp:DATA"/><xsl:text>   </xsl:text><xsl:value-of select="fmp:COL[4]/fmp:DATA"/><xsl:value-of select="$newrecord"/>         </xsl:for-each>     </xsl:template> <xsl:variable name="newrecord"><xsl:text> </xsl:text> </xsl:variable> ........ AND I'm getting :
      sku    id    status                     Child-SKU1     0123456789     Update Child-SKU2     0123456789     Update Child-SKU3     0123456789     Update Child-SKU4     0123456789     Update As you can see I get the 2 lines in there but not the DATA (and it does include the spacing between each export field)
       
      I've tried all kinds of variations on the 'distinct' section .... since I feel sure that's where the error is ..... trying to pull the data in but I can't seem to figure it out.
       
      FM export example data is :
      <FMPXMLRESULT> <ERRORCODE>0</ERRORCODE> <PRODUCT BUILD="06-18-2009" NAME="FileMaker" VERSION="ProAdvanced 10.0v3"/> <DATABASE DATEFORMAT="M/d/yyyy" LAYOUT="" NAME="SSP_Variations_1_3 BU.fp7" RECORDS="6" TIMEFORMAT="h:mm:ss a"/> <METADATA> <FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="SKU-Parent" TYPE="TEXT"/> <FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="SKU-Child" TYPE="TEXT"/> <FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="id" TYPE="TEXT"/> <FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="status" TYPE="TEXT"/> </METADATA> <RESULTSET FOUND="6"> <ROW MODID="61" RECORDID="83"> <COL> <DATA>Parent-SKU1</DATA> </COL> <COL> <DATA>Child-SKU1</DATA> </COL> <COL> <DATA>1234567890</DATA> </COL> <COL> <DATA>Update</DATA> </COL> </ROW> <ROW MODID="36" RECORDID="84"> <COL> <DATA>Parent-SKU1</DATA> </COL> <COL> <DATA>Child-SKU2</DATA> </COL> <COL> <DATA>1234567890</DATA> </COL> <COL> <DATA>Update</DATA> </COL> </ROW> <ROW MODID="29" RECORDID="85"> <COL> <DATA>Parent-SKU2</DATA> </COL> <COL> <DATA>Child-SKU3</DATA> </COL> <COL> <DATA>1234567890</DATA> </COL> <COL> <DATA>Update</DATA> </COL> </ROW> <ROW MODID="21" RECORDID="86"> <COL> <DATA>Parent-SKU2</DATA> </COL> <COL> <DATA>Child-SKU4</DATA> </COL> <COL> <DATA>1234567890</DATA> </COL> <COL> <DATA>Update</DATA> </COL> </ROW> </RESULTSET> </FMPXMLRESULT> I'm sure I've left out something, am going about this wrong or not explained this well enough but here it is .....
       
      ALL help is appreciated !!
       
       
       
       
    • By stovin
      I have created a basic Contact-> Order-> Line Item <-Inventory database but am at a loss how to go about creating the next stage.
       
      Our company signs out equipment to its employees.  Each Order can be made of multiple individual items from our inventory.  This is basically your typical Invoice solution except we are not selling items, but rather signing them out.
       
      The trick is how to assign individual Inventory items to a “Kit number & category which then can be pulled up in an Order portal.  Once that Kit number is pulled up in the portal, the line items automatically become populated with all the items associated with that specific Kit/category.
       
      Additionally the Order portal would also be able to pull up individual items from the Inventory which have no kit association.
       
      Items from the established kits could not be rented out individually until that particular item in the Inventory has it’s kit number association turned off / deleted.  This is to allow for upgrading, fixing, or moving equipment around to other employees which may have been assigned.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.