RET Posted May 2, 2002 Posted May 2, 2002 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
Gerd Muller Posted May 2, 2002 Posted May 2, 2002 SetField(fieldB , fieldA) this is working always, no matter if and on which layout your fields are.
RET Posted May 2, 2002 Author Posted May 2, 2002 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
andygaunt Posted May 2, 2002 Posted May 2, 2002 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
bert Posted May 2, 2002 Posted May 2, 2002 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.
Gogargirl Posted May 3, 2002 Posted May 3, 2002 You might want to check that your button is still formatted to run the script.
LiveOak Posted May 3, 2002 Posted May 3, 2002 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
Recommended Posts
This topic is 8244 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 accountSign in
Already have an account? Sign in here.
Sign In Now