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

Multiple windows and repeating field updates (plz)


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

Recommended Posts

  • Newbies
Posted

ok so I came into a lab that was using FM and I learned how to get things working fairly decent. there were a few exisiting DB's and I was building tables off of those. Here is the thing I need to have something checked (ie need order) and then insert something into a second file.

alright file 1 has a needed dropdown (yes/no) if yes then I need it to insert the item # from that record into a repeating field in a different file, I can open the file but I can't seem to get it to update anything in that file (file 2 = orders).

loop...

if(Exact ( "Yes" ; Lab Inventory Sort::Needed )

open file... (works)

set field (file2::fieldx ; lab inventory...)

so thats basically what I have and would like it to do but I guess I am just new at this and not too sure as to what I need in the script to insert values into file2.

thanks for the help and will be happy to clarify whatever you need

Posted

You need to know the index of the repeating field. Once you know that, use the option in Set field for the repetition number.

If the index is variable, then you won't be able to use a script; you'll have to do a calculation.

Posted

You need to get rid of the repeating fields and go to a proper relational design. You'll be much better off in the long run and even the short run. Transpower's suggestion will not work. Using standard Filemaker features you cannot set a repeat by calculation.

Posted

Bruce: Not true, you can set any index of a repeating field by a calculation; see some of my earlier posts.

Posted

If the index is variable, then you won't be able to use a script; you'll have to do a calculation.

I don't think Bruce realized you were speaking of a calculation field, but rather Set Field, which must be hard-coded. You used the word 'set', which wouldn't be relevant to a calculation field.

Posted

And thanks, again, Queue, for your help with some of my earliest posts in this forum regarding repeating fields.

  • Newbies
Posted

ok I can see how that will work but what is the syntax for an index? is it like fieldx[1] or what? Also I still have the problem of not being able to update anything in file2 after it is opened by file1--> would this just be easier to make a copy of file2 and put that into file1?

Thanks a ton

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