Solved

Determining a field's repetition when clicking on it

Posted on 2011-03-11
6
663 Views
Last Modified: 2012-05-11
I have a calculated repeating field which has a button/script attached to it. When the user clicks on it, I want to determine which repetition is being clicked on to inform the scripted action that follows. Nothing I've tried so far has worked. Get( ActiveRepetitionNumber ) produces only a zero because the cursor never enters the field and it's not possible to give an Object Name to each repetition of a field.

( Why am I using repeating fields at all? They have their uses, especially if you want the visual equivalent of a horizontal portal, which you can do using a calculated repeating field.)
0
Comment
Question by:Will Loving
  • 3
6 Comments
 
LVL 24

Author Comment

by:Will Loving
ID: 35113350
Never mind. I sort of wrote the key to the answer in my initial question when I wrote "because the cursor never enters the field". The trick is to allow the cursor to enter the field and then use an "On Enter" Script Trigger to grab the Repetition number using SetVariable to Get( ActiveRepetitionNumber ) ; followed by a Commit Records step to exit the field and then run the rest of the script.
0
 
LVL 4

Expert Comment

by:challengeday
ID: 35113368
Hi willmcn,

I think you could have separate buttons over the repetitions and pass a parameter to the script depending on which buttons is clicked.
0
 
LVL 24

Author Comment

by:Will Loving
ID: 35113400
It would work, but unfortunately that would mean 18 buttons. I just tested my script trigger solution which took at two minutes to setup and it works perfectly. Being in the field also allows to grab other related values at the same time before exiting. As far as the user is concerned, they never now the difference.
0
 
LVL 24

Accepted Solution

by:
Will Loving earned 0 total points
ID: 35160937
As noted above, I found a way to determine the repetition of the repeating by entering the field and running a script trigger to determine the repetition and then exit the field. However, if anyone has a simple method to determine the field repetition "on click" without actually entering the field, I'm interested.
0
 
LVL 8

Expert Comment

by:Tocacar
ID: 35410120
This question has been classified as abandoned and is being closed as part of the Cleanup Program. See my comment at the end of the question for more details.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Notes Portal not advancing to correct row 3 107
Filemaker 14 vs Delphi Embarcadero 7 186
FileMaker Pro: How to change fields 4 98
Does Surface Pro 2 have a max broadband speed 18 90
Conversion Steps for merging and consolidating separate Filemaker files The following is a step-by-step guide for the process of consolidating two or more FileMaker files (version 7 and later) into a single file with multiple tables. Sometimes th…
Having just upgraded from Filemaker 11 to Filemaker 12 over the weekend, we thought we would add some tips for others making the same move.  In general, our installation went without incident. Please note that this is not a replacement for Chapter 5…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now