?
Solved

Tab Panel Script Trigger Issue

Posted on 2010-04-07
17
Medium Priority
?
693 Views
Last Modified: 2012-06-27
Based on a prior EE answer, I revised a script in order to execute a calc when I entered the Tab "LeadCounter" from the "MainData" tab.  I gave each of these a name in the "Name field" in FM 11's Inspector and then attached it to the script, but it doesn't work.  What am I doing wrong?  See attached.

Also in the attached are screen prints showing I searched EE (why isn't my previous question about using script triggers with tab panels there?) and that I searched FM Help.  Thanks.
TabControlIssue.doc
0
Comment
Question by:rvfowler2
  • 8
  • 5
  • 4
17 Comments
 
LVL 9

Accepted Solution

by:
jvaldes earned 1000 total points
ID: 30027180
I do not understand what you are trying to do. If you need to trigger a script by entering a tab then use the script rigger OnObjectModify that is within each tab. If you need to have a calculation made when you select a tab, there is a little known trick that any calculation on the face of the tab will be done upon selection of the tab, including when the default tab is initially selected. The calculation should be made with a Let function.

Unfortunately when you change the font color to mask the calculation it will also be masked when you are in layout mode. I have a method I learned from FilemakerMagazine.com. But that is a different question.

Lastly to go to a specific tab or object use the go to Object command in the script editor.

Please be more specific see if I can help you.
0
 
LVL 2

Author Comment

by:rvfowler2
ID: 30121342
Yes, I wasn't clear, mixing two issues.  First, I want to prevent the tab "bounce," meaning when you select a Tab trigger to OnObjectModify, when you leave the tab, it also sets off the trigger, and I don't want that.  See the attached.  I tried to take care of the "bounce," but this scripting did not work.  How would you do it?

Second, I want a calculation to be set off once I enter a tab, but you answered that question.  Turns out my test of that didn't work for another reason, but fixed that.  Thank you.
TabBounceTest.doc
0
 
LVL 9

Expert Comment

by:jvaldes
ID: 30125031
To eliminate the bounce, use the script trigger to set a variable like $CurrentObject, not to execute a script. That way you can choose when you fire the script.

Tell me if this helps
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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.

 
LVL 2

Author Comment

by:rvfowler2
ID: 30127726
But I want to do both:  I want to prevent the bounce, but I also want to set off a trigger.  Notice in the earlier Word doc that I had successfully done it for an Admin Only tab so non-Admins could not enter the area and were sent back to the MainData tab.  However, I can't seem to make it work here.
0
 
LVL 9

Expert Comment

by:jvaldes
ID: 30134842
Fire the script from a different trigger, for example if you keep $CurrentObject, you can decide if the abject is the same as the prior Obect and not fire...
0
 
LVL 2

Author Comment

by:rvfowler2
ID: 30148345
I just tested it and it confirmed my memory that the only script trigger that works with Tab Panels is OnObjectModify.  The other issue is that for some reason that scripts I've attached above don't take care of the bounce.  Not sure why.  I'm new at this.
0
 
LVL 9

Expert Comment

by:jvaldes
ID: 30149484
Post an example of the problem and I will help you resolve it. I don't think I was clear, if the first step in your script that you trigger with OnObjectModify you check to see if $CurrentObject is different than the current object and only trigger if different it will not fire if you don't change the object in the same tab object.
0
 
LVL 2

Author Comment

by:rvfowler2
ID: 30151124
Yes, I never did understand why the attached AdminOnly script worked.  I just tested it in another dbase and it works!  But, it does not work here.  Now I'm really confused, so let me write this out.  First
set $tab = GetActiveLayoutObjectName
If GetActiveLayoutObjectName = AdminOnly
then
go back to old tab (but how do you script this?)

Forget it, I'm completely confused.  I know this is easy, but I just can't get it.  I have to get back to work.  I just spend a half hour on this.
Adminonly.doc
0
 
LVL 28

Expert Comment

by:lesouef
ID: 30432546
goto object ([tab name]) to swicth tabs.
have a look at my example I did a few weeks ago, it was taking care of the bounce problem as well. I have not got the file here, but I may locate it too-morrow on my other PC. Have you placed a trigger object on each tab?
0
 
LVL 2

Author Comment

by:rvfowler2
ID: 30515865
I'm not sure what example you mean.  I've searched EE and didn't find it, even the one I asked about 3 months ago.  Not sure what you mean about a trigger object on "each" tab as once I place a tigger on one tab, it seems to show up on all tabs.
0
 
LVL 28

Expert Comment

by:lesouef
ID: 30517671
I remember I did it after an explanation of jvaldes, maybe I did it for me only, and did not send it? can't remember now.
well, the file is on my portable I think, not even sure, maybe on my PC @ home (won't be there before next saturday). I'll have a look tonight on my portable and see if I have it with me.
0
 
LVL 28

Expert Comment

by:lesouef
ID: 30587422
internet connection down at the hotel, could not connect to check the file. will try again tonight.
0
 
LVL 2

Author Comment

by:rvfowler2
ID: 30611092
OK
0
 
LVL 28

Assisted Solution

by:lesouef
lesouef earned 1000 total points
ID: 30644887
0
 
LVL 2

Author Comment

by:rvfowler2
ID: 30826138
First, tried your method and it didn't work for me.  I edited out the message box and maybe I affected it.  See attached.  Also, figured out why my prior code worked in one database and not another.  Whoever gave me the code also had me put code into the conditonal formatting for a text box (also shown in the attached) that was on the AdminOnly tab panel.  Very strange way of doing it, but it works.  However, I think I'd rather use yours if I can get it to work.
TabControlIssue.doc
0
 
LVL 28

Expert Comment

by:lesouef
ID: 30850785
you are confusing the tab label which does not matter and the tab object name which the one to use for switching tabs. you doc does not show the tabs object names.
and yes, you need this conditionnal format on all tabs to find out the current tab, and set the old one to go back to it whenever needed
0
 
LVL 2

Author Comment

by:rvfowler2
ID: 30856408
Actually, I am aware of the difference between tab labels and the object names.  Notice that my labels have a space between them and the object names do not.  Looks like you confirmed that what I forgot was to add text and add the conditonal formatting script to it.  Thanks.  Awarding points.
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

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…
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…
Kernel Data Recovery is a renowned Data Recovery solution provider which offers wide range of softwares for both enterprise and home users with its cost-effective solutions. Let's have a quick overview of the journey and data recovery tools range he…
There may be issues when you are trying to access Outlook or send & receive emails or due to Outlook crash which leads to corrupt or damaged PST file. To eliminate the corruption from your PST file, you need to repair the corrupt Outlook PST file. U…
Suggested Courses

601 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