Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6316 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted (edited)

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 by Guest
Posted

Unfortunately I tried that and the copy item in script still doesnt pick up the contents

Posted

suppose you ahve two fields

check box field is field1

other field is field2.

setfield[field2, field1].

works in my test db.

Posted (edited)

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 by Guest
Posted (edited)

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 by Guest
Posted (edited)

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 by Guest
Posted

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

Posted (edited)

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 by Guest
Posted

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

This topic is 6316 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.