Jump to content
Server Maintenance This Week. ×

Link a script to a tab


This topic is 5520 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I have set up Tabs named by Position, i.e. Attorneys, Managers. The named tabs are part of the Header; the Body includes the lower part of the tab control. Each tab (built like a List) includes pertinent fields based on positon. The FoundSet is different for each tab. When the Attorneys tab is selected, I want only attorneys to display.

I put a transparent button on the tab to run a script for each tab. However, the user has to press the Tab twice before the script runs.

Is there a better way? Thank you.

Link to comment
Share on other sites

There are a few different ways to achieve this. The first way is to create fake tabs and attach scripts to them. Make the original tab control tabs hidden by using a fixed width of 0 pixels (there are posts on here about how to achieve this in further detail). Make sure you name each tab panel with an object name prior to hiding them so that you can reference them in your scripts using Go to Object.

Another method would be to use filtered portals for each of your different tab panel tabs.

Link to comment
Share on other sites

I would prefer using the filtered portals. However, am having problems. On a Form, I have 5 Tabs, 4 -- one each for a different group of people by Position from the same Employees table, and the 5th one for ALL employees. I have created 5 global fields (in the Employees table), one for each Position and the ALL category. I have related the global field to the Positions field (also in the Employees table) with a self join (duplicate) table.

All records are displaying on every tab. I'm new at this and pretty confused by this time. Any help would be appreciated.

Link to comment
Share on other sites

With this you will need 5 relationships. One for each of the global fields to the Positions field. Are you referencing the related self join for you portals?

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

I also want to link script to a tab. I have a tab to view invoices and then one tab that I want to create a new invoice, one to view a certain type of invoice. I guess I'm having trouble deciding to make a fake tab. Or creating a filtered portal as mentioned here. The one tab panel I want to click and the same screen as the invoice screen comes up but a blank record. My customer likes the whole tab control thing.

Any help would be appreciated. I so wish I could attach a script to a tab panel.

Link to comment
Share on other sites

  • 8 months later...

I'm returning to this old topic. I also wanted to associate a script start (GoTo Layout nn) to one of the Tab Panel choices. It can possibly be done via script triggering in FM 10, but does it work in IWP ? If not, how can this be done ?

Link to comment
Share on other sites

I think in this post, an actual tab panel is being confused with a design that mimics a tab panel.

In a real tab panel, the portal displayed in the panel must be a related child table. It could be a cartesian relationship. However, you cannot go to a different parent layout by clicking a tab panel tabs, without leaving the current parent layout.

A pseudo-tab panel is exactly that. Graphics added to a layout that looks like a tab panel. Another layout has these graphics in the exact same location, so that to a user it appears that they are on the same parent layout when they click between tab panels. This was actually how we all did tab panel interfaces before the "real" tab panel object was introduced in FM.

Here is a link to Geoff Coffey's technique for using Script Triggers with tab panels. Link

..and attached is an FM10 only demo file that uses Geoff's technique, modified from Fabrice's original.

onTabFocusScriptTrigger.fp7.zip

Edited by Guest
Added demo file
Link to comment
Share on other sites

This topic is 5520 days old. Please don't post here. Open a new topic instead.

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
×
×
  • Create New...

Important Information

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