August 9, 200718 yr I would like to be able to select a checkbox field in a record and get the contents of that field (ie set another field with the contents of the selected field) Is this possible? If I manually "copy" it works but if I use copy in the script it doesnt Edited August 9, 200718 yr by Guest
August 9, 200718 yr Duplicate the same field in layout mode but change it to a text field rather than a Checkbox. Michael
August 9, 200718 yr Author Unfortunately I tried that and the copy item in script still doesnt pick up the contents
August 9, 200718 yr suppose you ahve two fields check box field is field1 other field is field2. setfield[field2, field1]. works in my test db.
August 9, 200718 yr Unfortunately I tried that and the copy item in script still doesnt pick up the contents Doesn't need to be a script....Or I'm missing something. Radio Button will allow only one choice, if you like. Checkbox.zip Edited August 9, 200718 yr by Guest
August 9, 200718 yr To add further to this, if you are using a copy/paste in a script you should get away from that and use Set Field as asda has suggested. If you choose or need to do this within a script. With that off to bed Michael Checkbox2.zip Edited August 9, 200718 yr by Guest
August 9, 200718 yr Author Thanks guys - some useful tips What has been missed though, is this; I want to be able to select a field on the layout (from a multiple choices). Then get the contents, or my script know what the field is. I have tried object naming to limited success. The reason am doing this? -so I can use substitute calculation to change only one of the check box items without effecting the rest. field 1 item 1---->item 1 item 2---->item 5 item 3---->item 3 Obviously replace wont work as the records dont always have the same combination of items. Edited August 9, 200718 yr by Guest
August 10, 200718 yr Still not really clear on what it is you are trying to do. Maybe you can post a sample file. Michael
August 10, 200718 yr I'm not sure I am clear here either. But it sounds like your checkbox is a value list of field names. If you set the checkbox on the layout to not be able to enter in browse, you can place a button behind each of the check box boxes for the field names and use script parameters to select which field will be used to set you other field. I hope I am somewhere in the ballpark of what you want. Mike
August 11, 200718 yr Author Sorry for not being clear. Here goes. I have some checkbox fields where I would like to replace one of the item names to something else. Since some records already have the redundant item checked, I can use a looping script to do a substitution calculation to achieve my result. But, - here is the problem- I have a number of checkbox fields on my layout, so I need a near identical script for each one. I had a bright idea if I was able to select the outline of the field in browse mode and get the script to identify which field I had "selected"( ie clicked the edge of) then I would only need one script. I found If I name each field as an object the script will reselect it at each loop, but cant extract the contents. This script is not for a user to execute but for me to use only. Rather complex to describe but hope that helps. cheers Edited August 11, 200718 yr by Guest
August 11, 200718 yr Hi John, So you want to mark certain fields in a record and have them set where? Into one field? Or different fields? New records? Or make it so the fields you mark get the same value across all records? Still not seeing the structure you have. It sounds as if you are making more redundant data. We'll figure it out or maybe one of the "Forum Police" can help if they understand. A sample file of what you want could go a long ways though. BTW is this a cleanup of an old file or making a new one? Michael
Create an account or sign in to comment