September 16, 200718 yr FMP V6.04 I like to create a button that by clicking it would copy 8 fields (all address details of a client) so I can paste it in to another document. I am not sure how to go about this. Do I need to write a script, and if so does anybody have a sample as I am not sure how to go about it. Alternatively I can think of creating a layout like an envelope and copy it from there. However I am not sure how to do this either as I can not find a way of copying this text field. In other words I would like a user to only have to click one button to perform the whole copy routine. Maybe it is not possible? does anybody know? Thanks for your help
September 16, 200718 yr Hello ChangeAgent. If the eight fields in question are the only fields on the current layout, then simply choosing Edit>Copy with no fields active (ie after exiting the record) will copy all eight at once. However if that's not suitable, you will require a script and a global text field (which will have to be present on the layout, though it can be hidden). The script (for FileMaker 6) can be structured as follows: Set Field [GlobalTextField, Field1 & ¶ & Field2 & ¶ & Field3 & ¶ & Field4 & ¶ & Field5 & ¶ & Field6 & ¶ & Field7 & ¶ & Field8] Copy [select All; GlobalTextField] Exit Record/Request[ ] Once you have created a three-line script along the lines of the above, you'll be able to attach it to a button if you wish. :wink2:
September 16, 200718 yr Author Thanks CobaltSky, No there are more fields on the layout otherwise I would have used the copy method. I am going to experiment with your script. will report back. Pity the field (hidden) needs to be on the layout and can not be on some other layout as I have a compiled field (the 8 fields in one field compiled for a envelope printing job). No workaround? thanks
September 16, 200718 yr I have a compiled field (the 8 fields in one field compiled for a envelope printing job) Sure - if you have such a field already available on another layout you can use it. An alternative script to achieve that would be along the following lines: Freeze Window Go to Layout [YourOtherLayout} Copy [select All, Your8ValueField] Go to Layout [original layout] :wink2:
September 16, 200718 yr Author CobaltSky, Great, thanks a million! It works like a dream! Blessings and regards Edited September 16, 200718 yr by Guest
September 16, 200718 yr Now this is for fm6, but it isn't the healthiest of habits to teach newbes to reach out for clipboard tampering tools, when ever chances occure! --sd
September 16, 200718 yr Now this is for fm6, but it isn't the healthiest of habits to teach newbes to reach out for clipboard tampering tools, when ever chances occure! --sd Søren, Kindly read the question. ChangeAgent specifically asked for a way to copy some data to the clipboard for pasting into another document. FYI, the copy and cut commands are widely considered *industry best practice* for getting data onto the clipboard. :wink2:
Create an account or sign in to comment