[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Go to Field name calculated

Posted on 2005-05-02
15
Medium Priority
?
364 Views
Last Modified: 2008-02-01
In Filemaker 7 I can go (i.e. move the focus) to the next field by a script token.
In there a way to go to a well known field name programmatically (without cicling all the fields until the name of the current field is equal to the name that I want)?
A similar functionality is available with the token "Go to record by calculus" (I don't know the exact translation of the token because my version is not in English).
0
Comment
Question by:isiprog
  • 6
  • 4
  • 4
14 Comments
 
LVL 28

Expert Comment

by:lesouef
ID: 13908769
Almost:
you can go to next field for instance (it follows the tab order of the layout)
you can go to the field ny number (in design mode, see it tab number)
or by field name, the simplest (the name cannot be calculated, it is "hardwired" in the script.)
but the given field must be present in the current layout to to this, so don't forget to switch to the relevant layout before asking this in yr script.
0
 

Author Comment

by:isiprog
ID: 13908826
Thank you for your reply lesouef, but what I need is to calculate the name of the field where to go.
0
 
LVL 28

Accepted Solution

by:
lesouef earned 1000 total points
ID: 13909168
then you're trapped I am afraid, All you can do is a non smart serie of "if then else, etc" to switch to the right field. I know this is not what you expect, you'd like to switch to a field of which name = another field content or a computed one, as simple as to 2 concatenated names. So, I am stuck so far.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 28

Expert Comment

by:lesouef
ID: 13909239
got yr zip now, but not the related mail normally sent by server, my antispam refuses *@yahoo.com so I'll put you in my whitelist
So i'll have a look at yr stuff tonight .

Master Bill,
Here it is:
http://extranet.valblor.com/~adispo\GreatEscapes.zip
0
 
LVL 19

Assisted Solution

by:billmercer
billmercer earned 1000 total points
ID: 13909643
If you want to try the series of if statements approach, you can use the new Script parameter feature of FM7.

Perform Script ["GoToFieldByName"; CalculatedScriptParameterGoesHere ]

This will call the "GoToFieldByName" script, which would look something like this.

IF [ get(ScriptParameter) = "FirstName" ]
  Go to field [DB::Firstname]
else if [ get(ScriptParameter) = "LastName" ]
  Go to field [DB::Firstname]
else if [ get(ScriptParameter) = "Address" ]
  Go to field [DB::Address]
etcetera...
If you want something more dynamic, you can use store the field names in a repeating field rather than hard-coding them, and use a loop to go through the list. That way you can add/change the fields without recoding the script. You can then call this script with a calculated value for the parameter.

Not a great solution, but it's better than nothing.

0
 
LVL 19

Expert Comment

by:billmercer
ID: 13909648
Lesouef, did you post the link in the wrong topic?

0
 
LVL 28

Expert Comment

by:lesouef
ID: 13909910
I know I was gonna do it! 10 windows open at the same time...!
and I like yr idea with subscripts arguments
0
 

Author Comment

by:isiprog
ID: 13909955
I did not want to use "if then else" because I've a lot of fields simulating a grid. But if you say that this is the only solution, I will accept it, despite my wishes
0
 
LVL 28

Expert Comment

by:lesouef
ID: 13910233
why don't you use yr idea about looping through all fields and stopping when current field name = required one?
maybe not smart, but only a few lines, and fast if you hide/freeze the window while doing it.
0
 
LVL 19

Expert Comment

by:billmercer
ID: 13910372
isiprog, in this case, the correct answer to your question is "you can't do that."
Neither Lesouef nor I have any control over the features of FileMaker, so it's not really fair to punish us because the program doesn't have a feature you want. In this case, a grade of C is really not called for.

Please read this:
http://www.experts-exchange.com/help.jsp#hi54


One further suggestion: If you are trying to mimic an array, you might want to take a look at repeating fields. They can be used sort of like a limited form of array, you can return a value by a numeric address, which can be based on a calculation. And with a couple of calculations you can make it act two like a two-dimensional array.


0
 

Author Comment

by:isiprog
ID: 13910399
I need to satisfy two needs:
1) go to a well known field name depending on a choice in a list (so the loop thru fields may be acceptable)
2) simulate the behavior of Excel when I press an arrow key
I've a lot of fields placed like an Excel grid.
A lot of row (but not all) are a multiple value fields. Differents rows are different field names. Looping through all fields requires a dictinction if I am in a multiple value field or not.
If I am in a multiple value, I have to go to the next repetition of the field, otherwise I have to go to the next field name
It's a bit complicated and not elegant and not too fast.
P.S. I intercept the arrow key through a keyboard hook plug-in, than I call the script "MoveRight", "MoveDown", etc.
0
 

Author Comment

by:isiprog
ID: 13910543
Sorry for the grade, it was my first post (by the way i've consumed all my points) and it was not my intentions to punish you. It was my mistake to understand what the grade represent ( a vote to you and not my satisfation in the solution to the problem)
0
 
LVL 19

Expert Comment

by:billmercer
ID: 13912495
If you would like to change the grade, post a link to this question in the Support area and ask them to reopen the question for you. Or you can request a PAQ/refund and get your points back. I don't have a problem with that, and I don't think Lesouef would either.

"2)  simulate the behavior of Excel when I press an arrow key"
As you have no doubt discovered, that's not easy to do. Sounds like you have already put a lot of effort into this, though.

>"Looping through all fields requires a dictinction if I am in a multiple value field or not."

This can be checked using the FieldRepetitions() function. It will return the number of field repetitions that are currently displayed on your layout and the direction (horizontal or vertical)

0
 
LVL 28

Expert Comment

by:lesouef
ID: 13915428
what a hell of a job so simulate excel behaviour? what about using the chart display mode?
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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…
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…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…

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