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.

Combining fields/values in a button?

Featured Replies

I working on a database to automate our scholarship notification to students. I have it just about done, and want to be able to create a button that looks at the information I've given, and takes me to the CORRECT individualized letter I've created (with data for that need). Let me explain:

We have student who are going receive an academic scholarship and a housing scholarship. Some can just receive a housing scholarship, and others will just receive an academic scholarship. I have individualized letters with this data already entered.

What I want to do is make this an automated process, so a secretary, etc. can click a button once the award information is entered, and FM will look at two fields (radio buttons of a Value List) and print the correct layout/letter.

The two fields both have 2 Value List entries:

A B

Yes NO

I know FMP will need to evaluate both fields. What I don't konw how to do is to tell it how to look at them an decide where to do. I know how to create/assign a button. But do I use an "IF" statement? It's the scripting of the A/B, Yes/No fields that is baffling me. I can't get it to make a decision to proceed to one of my layouts.

I'd appreciate any help!

George

I think you can use a check box named "Scholarship" with the value list of "Academic" (for academic only scholarship) and "Housing" (for housing only scholarship). However, if the scholarship is for BOTH, simply check both check boxes (not radio button since radio buttons will not allow multiple values).

For your script, create a button to go to the corresponding layout and attach this script:

If (ValueCount (Scholarship) = 2)

Go To Layout ["Academic_Housing"] //this means both checkboxes have been checked and will thus send you to the layout representing academic and housing scholarship

Else if (valueCount (Scholarship) = 1) AND

(Position (Scholarship);"Academic";1;1) = "Academic")

Go To Layout ("Academic")

//If only one checkbox has been checked, verify if it is the academic one

Else if (ValueCount (Scholarship) = 1) AND

(Position (Scholarship);"Housing";1;1) = "Housing")

Go To Layout ("Housing")

//If only one checkbox has been checked, verify if it is the housing one then go to the corresponding layout

Else

Message ("Please click one or both checkboxes representing type of scholarship")

//No check box has been selected, prompt user for action

End if

End if

End if

Try making this your script parameter:

2 * ( ABfield = "A" ) + ( YesNoField = "Yes" )

Then make your script to Go to Layout [ Layout Number by calculation ], with the calculation of:

n + Get(ScriptParameter)

where n is the number of the first of the 4 possible layouts (they have to be consecutive in the layout order).

As an aside, it is always more convenient, IMHO, to define a 2-state field as a number, with 0 and 1 as the possible values.

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.