May 2, 200223 yr I have posted serveral questions about scripts and all the inforamtion has been very helpful, however I need more information. I can't seem to get this script to work exactly the way I need it to. I have created a script that will (with the push of a button)copy the data from fieldA to fieldB.....the problem is that fieldB is in a different layout and I can't get this to work. How can this be done? Please Help! RET
May 2, 200223 yr SetField(fieldB , fieldA) this is working always, no matter if and on which layout your fields are.
May 2, 200223 yr Author I have tried this for hours now and I still can't get this to work. First of all I can't seem to enter more then one field in the SET FIELD option. I can choose "set field" and use the "specify field" but will only let select one field at a time. Am I doing something wrong? the only other option is: Specify... this will allow me to select the second field but when i run the script nothing happens. Any Ideas? RET
May 2, 200223 yr Hi, When you use set field it is basically copy and paste (but it is backwards) First you specify the field you want the information to go into (or paste). This is the field button in the options. (so in your case FieldB). Then you tell it what you want it set to (or where you want it copied from). This is the specify button in the options. This brings up the calc window, and you choose fieldA. HTH
May 2, 200223 yr I just tested it in FM 5.5 but it does not matter in which layout the field is. Even a field in a related database is no problem. Please check if the fields are the same type. (text, number, date). Does it work when the fields are in the same layout ? Set Field (TargetField,SourceField). When both fields are textfields the data from the SourceField is copied into the TargetField.
May 3, 200223 yr I'm getting the impression that you have some major misconception about how FM works. Describe in detail what you are trying to do and give us a script listing? Also, are you confusing "fields" and "records"? -bd
Create an account or sign in to comment