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

object name from button click


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

Recommended Posts

Posted

Is there any way that a click on a button can pass the object name of that button to the script that the button runs?

It would be OK if this is done as a script param, or some other way. As long as I don't have to enter the object name again as a hard-coded script param.

Thanks!

M.

Posted

Yes, there is a "not common" way !

Each button have to be a rep of a repeating field, than you can pass the Get ( CalculationRepetitionNumber ) as the parameter to a $$ variable by using ToolTips.

Posted

Hmm, clever, but in this case that won't work. The buttons can't be repeating fields.

Why ?

If they are pictures, the repeating field can be a container field.

Posted

OK, I give up. How does that work?

How does $button end up = the # of the repetition clicked? I don't see where the variable is being set.. there's no script setting it, no calc.

Do tell.

Posted

It's done in the tooltips setup. That's also the main disadvantage of this method: you must position the cursor above the button and wait until the tooltip updates, before clicking.

Posted

Hmm, actually on my machine that isn't true, which is why I didn't suspect a tooltip. The variable updates as soon as the cursor moves over the object, long before the tooltip fires. I've verified this w/ the Data Viewer.

Good trick, although it still won't work for me because I can't make my buttons repeating fields. (And you're just going to have to trust me on that one, Daniele. It's not worth it to discuss the reasons.)

Posted

It's done in the tooltips setup. That's also the main disadvantage of this method: you must position the cursor above the button and wait until the tooltip updates, before clicking.

This isn't true on windows machines: the $variable updates instantly, even before the ToolTip shows itself

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