Jump 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.

Compare Checkbox fields?

Featured Replies

  • Newbies

Howdy!

Q: I want to flag the user when checkbox options in Field B match the options selected in Field A. I don't know how!

Details:

I have a value list of checkboxes.

This list is EDITABLE by the user.

Let's say:

Option A

Option B

Option C

Option D

(keep in mind, the names and number of items in the list can change!)

There are two fields:

Field A

Field B

Field A is used to select Options from the value list. This is generally set once.

Field B is used to re-select the same options at a later time. Generally at indeterminate times (not all at once) and not in any order and definitely not in te same order as those made in Field A.

I would like to have a calculation field to flag the user when all of the items selected in Field A have also been selected in Field B.

Since the Options are adjustable by the user, I cannot hard-encode the value list item names into a calculation.

Also, the "If (Field A = Field B,...)" command does not work because that is dependent on what order the user selected each option.

So Field A may contain:

Option B

Option A

Option D

But Field B may contain:

Option A

Option D

Option B

The two fields do not equal each other, but all selected checkboxes of Field A **ARE** selected in Field B.

I've tried using different methods, such as Case, Replace, Substitute, but cannot figure out how to make this work.

I'm using FMP 6.0v4

Thanks!

Paul

FileMaker Version: 6

Platform: Mac OS X Jaguar

there is an

EXACT ( ...

calc step in the text functions calculations, this can be used for comparrisons of two text fields

Here's one option. Create two value lists (FieldA and FieldB), one based on id::FieldA and one on id::FieldB, where id is a self-relationship from serial number to itself. Then create a calculated text field of: Case( ValueListItems( Status(CurrentFileName), "FieldA" ) = ValueListItems( Status(CurrentFileName), "FieldB" ), "Match" ). Put this calculated field on your layout to flag the user.

Due to the way value lists are indexed, you'll have to refresh the calc after making a change, often done by entering Find Mode, then going back to Browse Mode. You can do this either by adding a Refresh button to the layout or scripting each selection by putting a transparent button over each option and attaching them to scripts like:

Set Field [FieldA, Substitute(Case(PatternCount(FieldA, "A"), Substitute(FieldA, "A", ""), FieldA & "

Exact won't work, unfortunately, because the order of selection determines the order of items in the field.

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.