3 Replies Latest reply on Nov 3, 2009 10:52 AM by mrvodka

# repeating fields (questions)

### Title

repeating fields (questions)

### Post

I've never used repeating fields.

Can I do any of the following?  If so, what is the function used in a calculation?

-- create a button that will go to the next blank repeat and enter the current date?

-- find the most recent date entered in the list? (presumably the last, but not necessarily)

-- find the total number of repeats entered?  (for example, if there were 5 separate dates entered, the calc would return "5")

• ###### 1. Re: repeating fields (questions)

firth5 wrote:

I've never used repeating fields.

Can I do any of the following?  If so, what is the function used in a calculation?

-- create a button that will go to the next blank repeat and enter the current date?

-- find the most recent date entered in the list? (presumably the last, but not necessarily)

-- find the total number of repeats entered?  (for example, if there were 5 separate dates entered, the calc would return "5")

1. You can try to loop through the reps to see if it is empty. Try a script such as:

Loop

Set Variable [ \$k; \$k + 1 ]

If [ not IsValid ( YourRepeatingField [ \$k ] ) ]

Exit Script []

End If

If [ not IsEmpty ( YourRepeatingField [ \$k ] ) ]

Set Field [ YourRepeatingField [ \$k ]; "Whatever value" ]

End If

End loop

2. Max ( YourRepeatingField )

3. Count ( YourRepeatingField )

• ###### 2. Re: repeating fields (questions)

I'm pretty much a newbie so bear with me.

I'm trying to do the exact same thing but when I use the script provided a) it overwrites the value in the first repeat or b) if there's nothing in that field it does nothing.

Also, I'm using v10 and when I enter the script I can't enter it like it's written. On the set variable line no matter what I do it puts Set Variable [\$k; Value: \$k + 1]. Am I doing something wrong or is this OK?

Is there a way that run this and change the value on several records being browsed at once?

Thanx

• ###### 3. Re: repeating fields (questions)
What are you trying to do? Why are you using repeating fields?