Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

get contents of selcted field

Featured Replies

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

Duplicate the same field in layout mode but change it to a text field rather than a Checkbox.

Michael

  • Author

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

suppose you ahve two fields

check box field is field1

other field is field2.

setfield[field2, field1].

works in my test db.

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

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

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

Still not really clear on what it is you are trying to do.

Maybe you can post a sample file.

Michael

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

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

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

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.