Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

  • Newbies
Posted

hi,

I have two fields 'fld1', 'fld2'. Both fields are a popup menu and can contain one of the following the values:

0,1,2,3,4,5,6,7,8

I have a third field that needs to contain the start value, all the values in between and then the end value.

ie if 'fld1'=2 and 'fld2'=6

then fld3= 2,3,4,5,6

(with or without commas)

I have tried to create a series of calculations, but I am stumped. Does anyone have a solution. It could be a script if it has to be, but it would be better as a calculation if possible.

Thanks

Posted

Assuming you have validated that fld1 is no bigger than fld2. Then

set up fld3 as an unstored calculation:

MiddleWords( "0, 1, 2, 3, 4, 5, 6, 7, 8" ; Fld1+ 1; Fld2 - Fld1 + 1)

Posted

You need to make a Custom Function to use in this calcaulation.

Make a Custom Function Range with the Parameters Start & End.

The function looks like this:

Case ( End > Start ; Range (Start; End - 1) & "," & End; End )

Now Define Fld3 as a text calculation = Range ( Fld1; Fld2 )

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