please don't use replace field contents for this, that can modify a value in a field for every record in your found set. That could be hundreds of records modified in a single step!
You may not need a script at all. An auto-entered calculation might be set up that updates the second field in response to data entered into the first.
Thank you for that advise. You were right... the replace field contents does change them all.
I'm not sure how I would use the auto-entered calculation. To my understanding the auto-enter option would fill in the field as soon as the record is created.
Am I wrong? I'm pretty new to filemaker and scripting so I have a very limited knowledge of the different script uses.
This is the auto-enter calculation for the text field: Field B
not IsEmpty ( Field A ) ; "Shipped" ;
There's an auto-enter option: "do not replace existing value..." It depends on what you need as to whether you want this option selected or not for this field. If it is selected, then the contents of Field B will change any time the the contenst of Field A change. If it is cleared, it will enter a value when Field A is changed only if there isn't already data in Field B.
A straight up calculation field can also be used--it just depends on what you need to set up here that works best for you:
Case ( Not IsEmpty ( Field A ) ; "Shipped" )
Would produce much the same result as an auto-entered calculation with the "do not replace..." option cleared.
Note that there are differences between an auto-entered calculation and a calculaiton field depending on whether fields referenced in the calculation are defined in the same table or a related table.
Both Raybaudi and I are assuming that both fields are defined in the same table.
Yes, they are in the same table. Would this calculation go in the "B" Field? it keeps putting "0" in my B field.
Yes, this would be the calculation for your B field. Is the B field of type text or type number? It should be of type text here if you want to display a text result.