Jump to content
Sign in to follow this  
Greg Hains

Detemining Repetition Number

Recommended Posts

Hi there.

I have a table that (amongst other fields) has two repeating fields of 20 repetitions. This layout is used as a timesheet function where the two fields record a date and a duration respectively.

I am trying to setup a button and script that inserts the date into the date field. I have setup a monitoring variable of get(calculationrepetitionnumber) that shows which repeating field I am in and then place the date into that field with that repetition number, but the number always reads 1 regardless of which field repetition number I'm in.

Anybody suggest how I can achieve this please?

Greg

Share this post


Link to post
Share on other sites

Hi Daniele,

Thankyou very much for your response. This will work perfectly. :(

As a newbiw I have a question though - there is reference to a $$rep in the script. I understand this to be a global variable. Please advise where it is set - I cannot see how to set these variables.

Thanks,

Greg

PS: And your English fine. :B

Share this post


Link to post
Share on other sites

Hi Greg

that was the tricky part :B

The $$rep is setted by tooltip of the repeating field

Share this post


Link to post
Share on other sites

Excellent. Thankyou so much. Works well.

I didnt know you could set variables with tooltips - I thought they were inforamtive balloons only, but it goes to show that there's lots I dont know about FmPro.

Cheers,

Greg

Another happy customer.

Share this post


Link to post
Share on other sites

This will work perfectly.

I am afraid not. You should not put your data in repeating fields, because then you won't be able to find it, or summarize it. Use a related table, where each entry will be a separate record, and enter your data into a portal.

BTW, selecting a repetition via tool tip does not work well under OS X, because of the delay in calculation.

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×

Important Information

By using this site, you agree to our Terms of Use.