October 1, 200421 yr Hi, If you are in a layout and you have a field or a number of fields, say a table of Music Groups information and you would like to put this information into another table, say called "Managers", then what is the best way to do this? I have found 2 ways so far. First way is using global variables. I set the field(s) I want to copy into a global field in the same table. I then switch to another layout, and then do a Set Field on the record in the other layout using the global variable. Set Field [bands::gBandName; bands::name] Go to Layout ["manager layout" (managers)] Set Field [managers::band_I_manage; bands::gBandName] The second way is to use Copy / Paste and toggle the layouts- although it seems for more than one field you would have to switch back and forth between the 2 layouts. With one field, I see no flicker... yet. Copy [select; bands::name] Go to layout ["manager layout" (managers)] Paste [select; No Style; managers::band_i_manage] - but for each field you want to copy, you have to switch back to the other layout. what is the best way ? thanks for your help in advance, sincerely, J__
October 1, 200421 yr There is a 3rd option and that is to combine SET FIELD with a relationship so you can avoid using the global fields. What that relationship should look like isn't easily answered without having a look at the structure of your solution. Generally SET FIELD is preferred over COPY/PASTE for two reasons: - it does not destroy anything the user has put on the clipboard - the field does not have to be on the layout that is frontmost when the script runs
October 1, 200421 yr Author Hi, Thanks for the response. Could you please elaborate on this approach with the relations, how would you combine set fields with a relationship? I wasn't thinking about the clipboard - good point. I have been using Set Field, but read something somewhere and wondered (am wondering) if there is a better preferred way to do this. thanks for the response again, sincerely, J__
Create an account or sign in to comment