Solved

Determining a field's repetition when clicking on it

Posted on 2011-03-11
6
666 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 25

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 25

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 25

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Pop up windows can be a useful feature of any Filemaker database.  Though best used sparingly, they can be employed in a multitude of different ways, for example;  as a splash screen at login, during scripted processes to control user input, as pick…
Problem: You have a hosted FileMaker database and users are tired of having to use Open Remote or Open Recent to access the database. They say, "can't you just give us something to double-click on rather than have to go through those dialogs?" An…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

831 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