Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

  • Newbies
Posted

I'm trying to make a inventory/order database. I have one file that has all of my items in individual records (quantity, description... etc.). I want to be able to put ordered quantities in a field then "export" the order to another file to keep a record of ordered items. In this second file, I want the quantities in one repeating field, the descriptions in another repeating field and so on. This way if an items changes in the inventory (deleted, change description... etc.) the orders are still intact. This is why a portal will not work frown.gif. What I can't get to work is a script function to put the contents of a field from the inventory file to a repeating field in the order file. Or more to the point, it will not fill the repetition in. Any ideas?

Posted

Hey David,

You could do all mutations of existing inventory in separate records. That way you can keep your orders 'original' without having to rely on repeating fields. Repeating field are REALLY to be avoided for this kind of applications.

But about the original question: doesn't it work if you specify the repetition in the field select dialog from the 'set field' script step? (the upper button if you got the 'set field' step selected in the script editor?

Posted

In the Set Field script step, you have to specify the repetition directly--i.e., you have to hard code it; you can't use a variable for the repetition number. That means that if you have ten repetitions, you will need 10 Set Field steps. If you have 10 repeating fields with 10 repetitions each you will need 100 Set Field steps. It gets ugly.

On top of all that, there is a bug that occurs when you try to use the set field step to set the repetition of a field based on the value in another repeating field, unless you use an intermediate non-repeating field to temporarily store the value So this doubles the number of Set Field steps again up to 200 for 10 fields of 10 reps each.

And once you have the data in the repeating fields, you will have it in the most useless data format that Filemaker provides. You won't be able to find, group or sort based on the individual items in the repetitions.

You should really take Ernst's advice and use individual records for the data, (possibly in a related file accessible by portal from the main file).

  • Newbies
Posted

I guess a portal is the best way to do this then. I just wont be able to allow records in the inventory to be altered, only duplicated and then editted.

Thanks for the help, I have my work cut out for me for the weekend wink.gif

This topic is 7774 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.