macjos

ObjectName from button, conditional formatting

5 posts in this topic

Hi there,

Is there a way to determine the name of an object from within conditional formatting and or script parameters?

Example: I have a number of buttons that all have object names. When I click on the button I just want to pass the object name as a script parameter. 

 

All the best,

Share this post


Link to post
Share on other sites

I believe this works when you click the button to send as a script parameter: Get ( ActiveLayoutObjectName )

Edit: Correction. I forgot this function doesn't work when a button is clicked. It does work if you tab to the object. 

You can still have 1 script and just pass the parameter from the button to the script. You will need to edit the button's script parameter for each button.

Edited by Josh Ormond
1 person likes this

Share this post


Link to post
Share on other sites

Hello,

Get ( ActiveLayoutObjectName ) don't work but GetLayoutObjectAttribute ( NameObjectButtonFromButtonBar ; "isActive" ) is (presque) ok, but not good if you are ≥2 buttonBar ( ≥2 activButton )

I just work on this problem, formatting can read "self" (button title) and can declare variable with the active object ( v14 ButtonBar )

But with Conditional formatting in v12, v13 and v14, you can take the title of the last clicked button. In v14 and the button bar, you can take the nameObject of the barButton - Last Button clicked

Here a link for the demo file ( open for v12 to v14 ) ( not ok WebDirect )

Agnès

Edited by Agnès

Share this post


Link to post
Share on other sites

Agnes,

 

I already saw your solution, good work, but not enough for me. I just want to have the object name ( not the visible name on the button because I work with a multi-lingual solution ) and also for web direct…

 

 

Share this post


Link to post
Share on other sites

Hi,

the behavior of the formatting is not the same with Web-direct and GetLayoutObjectAttribute ( NameObjectButtonFromButtonBar ; "isActive" ) don't work with web-direct, may be a bug in the function, button is active but we can't take information

Agnès

Share this post


Link to post
Share on other sites

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