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

How to set 2nd field on selection of 1st field


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

Recommended Posts

Posted

Hello,

In FMP7 I've got a field (A) with a simple pop-up list. On selection of the data, I'd like to set a second field (: to a particular value.

I set my field (A) to be a button with a two step script. 1. go to field A (allowing selection of the data). 2. set field (: to some value

For some reason, the second step doesn't execute until I select the field/button a second time. Any thoughts?

thanks in advance,

Heather

Posted

Hi Heather

I think that the behaviour you describe is what one should expect ( but I am not an expert - been shot down in flames many times before!!)

A way round this would be to make field 'B' a calculation field with a calculation something along the lines of

Case(field'A'="apples";"oranges";field 'A'="lemons"; "Limes";"")

The first two conditions are fairly obvious, if A=apples then B will be oranges etc. You can have as many of these conditions as you like.

The last set of quotes which do not have a condition attached to them are the default result (in this case null but can be whatever you want), if 'A' does not meet any of the required conditions.

Using a formula like this means that 'B' will contain what you want without the need for a script

HTH

Phil

Posted

... thats a really really odd way of going about things... why not just use an auto enter text or number... or yeh a calc field... or if the case function were to get to long because of a really long popup list ... maybe a related table to lookup values from?

genx

This topic is 6856 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.