Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

I am trying to build a processing system

I have 20 fields, depending on the the condition, field 1 and 3 and 6 may get populated or 1 2 and 4 .. no set pattern...

I need to be able to copy those ones to another setup of 20 fields. but in order without leaving any blank fields... I can write a bunch of scripts to do this, but it seems their has to be an easier way...

field1 = t1

field2 =

field3 = tg

field4 =

field5 = tj

field6

field7

etc...

the second set of 20 field

field1.1 = t1

field2.1 = tg

field3.1 = tj

field4.1 =

field5.1 =

field6.1 =

field7.1 =

etc..

Posted

but it seems their has to be an easier way...

There probably is - but it's hard to tell with such an abstract description. Please explain what your fields are, and what does a record represent - and why do you find it necessary to shift data among fields.

Posted

There probably is - but it's hard to tell with such an abstract description. Please explain what your fields are, and what does a record represent - and why do you find it necessary to shift data among fields.

OK... for the long desc.

the field represent different lengths of tops in a kitchen.. but in a kitchen you can have different depth tops, a kitchen with say and L-shaped top that is 120" x 80" may also have an island top that is 86"x36"

so I need to be able to put all the same depth tops together to run through a nesting routing in order to calculate the best yield in material.

so I have fields to do this, but I need to copy all the same depth tops together.. so after it checks the 120 x 80, then I will clear the fields and insert the island field and see what length(s) I need for that.

I hope this is enough information..

form.jpg

tops.jpg

Posted

I'm afraid it's clear as mud... I am guessing you should use records in a related table for the multiple tops, then summarize them by depth.

OK.. sorry.. let me try simpler...

see attached screenshot

that should be real simple I hope.. thats not to say the solution will be simple...

Thanks

SIMPLER.jpg

Posted

I am asking for the purpose, because the process you describe is difficult, error-prone and most likely not necessary. I suggest you look for another approach - such as the one I have suggested earlier.

Posted

I need to be able to put all the same depth tops together to run through a nesting routing in order to calculate the best yield in material... that should be real simple I hope.

Ah, this is a cutting stock problem, which is related to the travelling salesman problem.

http://en.wikipedia.org/wiki/Cutting_stock_problem

http://en.wikipedia.org/wiki/Travelling_salesman_problem

The fact that there are Wikipedia articles dedicated to the topics indicates these are neither simple nor trivial problems to solve. The challenge is that all simple (ie, brute force) methods become computationally unfeasible as the number of items increases, because the calculations increase at an exponential rate.

Most certainly get your data structure right as *Comment recommends. After that you'll need to work out a method for calculating the best yield, and most probably a script will be needed.

From the travelling salesman wikipedia article:

An exact solution for 15,112 German towns from TSPLIB was found in 2001 using the cutting-plane method proposed by George Dantzig, Ray Fulkerson, and Selmer Johnson in 1954, based on linear programming. The computations were performed on a network of 110 processors located at Rice University and Princeton University (see the Princeton external link). The total computation time was equivalent to 22.6 years on a single 500 MHz Alpha processor.

Posted

... very often a Pareto solution is quite adequate

Only in about 80% of cases.

Posted

Ah, this is a cutting stock problem, which is related to the travelling salesman problem.

http://en.wikipedia....g_stock_problem

http://en.wikipedia....alesman_problem

The fact that there are Wikipedia articles dedicated to the topics indicates these are neither simple nor trivial problems to solve. The challenge is that all simple (ie, brute force) methods become computationally unfeasible as the number of items increases, because the calculations increase at an exponential rate.

Most certainly get your data structure right as *Comment recommends. After that you'll need to work out a method for calculating the best yield, and most probably a script will be needed.

From the travelling salesman wikipedia article:

An exact solution for 15,112 German towns from TSPLIB was found in 2001 using the cutting-plane method proposed by George Dantzig, Ray Fulkerson, and Selmer Johnson in 1954, based on linear programming. The computations were performed on a network of 110 processors located at Rice University and Princeton University (see the Princeton external link). The total computation time was equivalent to 22.6 years on a single 500 MHz Alpha processor.

This is not a cutting stock problem, that is solved and works perfectly..... if we forget about that and just copy the information from one field to the next in order is all I need...

thanks

Posted

I do suspect that there's a better data model, but back to your question, try making a script like this:

Set Variable( $fields ; List( field1 ; field2 ; etc. )

Set Variable( $count ; ValueCount( $fields ) )

Set Variable( $i ; 0 )

Loop

 Set Variable( $i ; $i+1 )

 Exit Loop If( $i > $count )

 Set Field By Name( "table::field" & $i & ".1" ; GetValue( $fields ; $i ) )

End Loop

This assumes that your target fields are really named field1.1 etc. -- and use your table name where it says "table".

Posted

This little script was absolutly perfect... thank you...

I do suspect that there's a better data model, but back to your question, try making a script like this:

Set Variable( $fields ; List( field1 ; field2 ; etc. )

Set Variable( $count ; ValueCount( $fields ) )

Set Variable( $i ; 0 )

Loop

Set Variable( $i ; $i+1 )

Exit Loop If( $i > $count )

Set Field By Name( "table::field" & $i & ".1" ; GetValue( $fields ; $i ) )

End Loop

This assumes that your target fields are really named field1.1 etc. -- and use your table name where it says "table".

This topic is 4965 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
×
×
  • Create New...

Important Information

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