Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

Guys,

 

The old guy trying to learn new tricks.. I am trying to devise a little help for a friend. The problem :

 

A layout with a map pasted on it. On this map I need to set buttons with names, and want to see related record windows popup when I click the button.

The layout is in the same database the record I am looking to visualize.

I tried several way, but I only get the first record in the list..!!! I may not be smart enough for the task..! New to FMP 12, and not really familiar with triggers capabilities...!!

 

However I am wondering how could I do to have the button name taken into consideration by FM and popup the window the correct record. 

 

Thanks in advance

 

 

 

Posted

For some reason, buttons don't pass information about themselves when clicked, e.g. you can't pass a script parameter of "Self" and get the button's object name.

 

What you can do is assign each button a script parameter, which could be the search criteria, which I'm guessing might be a city name.

 

Your script could then go to the appropriate layout, enter Find mode, and Set Field[ Get(ScriptParameter) ]. Etc.

Posted

Thanks,

Interesting approach, I´ll work on it and keep you posted.

On other hand, someone should convince those guys to have that capability added in the next upgrade; it would be a great advance in FMP.

Posted

Remember that an object in a portal knows what record it is attached to.

Posted

Thanks,

 

Of course, but the case is that the background is a map, and on the map are objects (buttons). In that case how can I define button through the relationship ???. Using fields instead of buttons..??

Another lead to follow, I like this..

As I said, someone need to convince FMP fellows to add the "self" parameter (or similar) to a button, which certainly would expand FMP capabilities.

rgds

Posted

You put a portal on the layout and put the button inside the portal.

 

Portals do not have to be large; and they do not have to be multi-row.

Posted

See attached. 

 

All the buttons are inside single row portals and all the button scripts are the same. They just pass the contents of the field as a parameter.

 

The only difference is that each portal has a simple filter to limit its contents.

 

For purposes of the example, the SE portal has been made transparent by setting line to none and fill to none.

PortalMapButton.fmp12.zip

Posted

Whoaa,

Effectively, that is a good "turn around" of the problem, Thanks a lot guys, very much appreciated

Posted

UPDATE: two approaches demonstrated.

 

On the NE/SE portals, the field contents are passed as parameters as in the first example.

 

On the NW/SW portals, no parameter is passed. The script captures the contents of the field directly.

PortalMapButton.fmp12.zip

This topic is 4209 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.