I would like a script that will highlight the last date field with an entry in it.
Assuming the entries are in chronological order, you could use conditional formatting =
Self = Last ( Payment )
You should consider using individual records in a related table instead of repeating fields.
Thank you Michael for your prompt answer. The conditional formatting works great to highlight the last field used. However, I guess, I did put the question right. I really need a formula for a script that will actually enter that last field, that in return would bring forward the tab in which the field is hiding behind. Right now I would have to click on each tab one a the time until such field is revealed. This is an existing file with a lot of records in it, and it would be hard to reformat it at this point in time. I noticed by reading other comments that nobody seems to like repeating field too muck. Thanks
I really need a formula for a script that will actually enter that last field, that in return would bring forward the tab in which the field is hiding behind.
For what purpose? You can bring the correct tab to front simply by calculating =
Div ( Count ( RepeatingField ) - 1 ; 12 ) + 1
In your example, this will return a number between 1 to 6, which you can then use in a Go to Object  script step to go to the corresponding tab (after having assigned object names to the tabs).
If you really want to insert the cursor into the last repetition, you could just call the Go to Field  step, specifying Count ( RepeatingField ) as the repetition to go to. IIRC, this will automatically select the relevant tab too.
Message was edited by: Michael Horak
I took your advise and went after the tabs instead, here is the formula I used in my script:
If [ Count(My Data Base::Payment Date)<13]
Go to Object [Object Name: Tab1]
Else If [ Count(My Data Base::Payment Date)<25]
Go to Object [Object Name: Tab2]
Else If [ Count(My Data Base::Payment Date)<37]
Go to Object [Object Name: Tab3]
Of course I have six tabs so I added a few more Else Ifs. Works perfect...thanks
Of course I have six tabs so I added a few more Else Ifs.
As I tried to say, you could do this with a one-liner:
Go to Object [ "Tab" & Div ( Count ( My Data Base::Payment Date ) - 1 ; 12 ) + 1 ]