Jump to content

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

Recommended Posts

Posted

If I create a calculation field, and in the Field options set the repeating value to 6, and when I place the Field in my layout I set the Field Format Repeat to 6:

In the calculation for this field I enter "1"

In my layout the first of the 6 repetitions contains the 1, the other 5 are empty. If I use this calculation----

"1" & "2" & "3"

Then the first repetition reads 123, the other 5 are empty.

Can I modify the calculation so that the "1" shows up in the first repetition, the "2" shows up in the second repetition, and so forth. I know there is other simple ways to do this, but I need the field to be a single field with repitions with different data in each field.

Posted

You can't. Repeating fields are a holdover from the FM 2.0 days and it's best not to use them. There is always another way to do what you want.

-bd

Posted

There are cases when a repeating field is of value for storing variables, graphics, or other array similar information. Otherwise, LiveOak is right. If you simply need to store the values 1,2,3,4,5, & 6 in separate fields, then create a repeating global field and enter the values by hand.

If, on the other hand, the content of each repetition is not fixed, but should be calculated based on another non-repeating field, then you need to use the Extend command. However, I can only state yet again, stay away from this approach unless you have no other way to do this. Maybe if you were to let us know exactly what you are trying to achieve, we could help you more. In other words, why do you need this?

Rigsby

Posted

Start with a global field, gDays, with 31 repetitions, and fill those repeats with the numbers 1 through 31.

Next you need a date field, I'll call it myDate.

Now you need a field that calculates the number of the last day of the month , I'll call it EndOfMonth:

Day(Date(Month(myDate) + 1, 0, Year(myDate)))

The grande finale is a calculated repeating field, DaysCalc:

Case(gDays less.gif Extend(EndOfMonth), gDays)

My gut says there is a way to do it without the global field, but my brain is not cooperating.

Posted

OK, here is what I really need it for:

I need a field that will be set-up to repeat 31 times (horizontally).

In the first field a calculation that looks at a field called TadaysDate and looks at the month. Depending on the month, it will determine how many days are in that month, and fill in each of the 31 fields accordingly with a number for each day:

1 2 3 4 5 6 7

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