Hi,
I'm trying to make an action perform two things using a smartshape. I'd prefer not to use a macro.
Searching on "multiple" is too broad, so I'm a little stuck
What I'm trying to do is have a shape labelled "Settings" where the user can choose a set of criteria.
This is a toggle.
Setting Prop.ShowSC changes the format of relevant shapes and highlights those that fit a criteria.
At the same time, an information box explains the highlighting, and appears / disappears with the highlights.
Both these work perfectly when set independently:
Actions_Row_2=SETF(GetRef(ThePage!Layers.Visible[7]),NOT(ThePage!Layers.Visible))
Actions_Row_2=SETF(GetRef(ThePage!Prop.ShowSC),NOT(ThePage!Prop.ShowSC))
But what I would like is the two things to happen with one toggle. Something like this:
Actions_Row_2=SETF(GetRef(ThePage!Layers.Visible[7]),NOT(ThePage!Layers.Visible)).....SETF(GetRef(ThePage!Prop.ShowSC),NOT(ThePage!Prop.ShowSC))
Where ..... is a syntax I'm unaware of. Very grateful for your thoughts... :)
try syntax
SETF(GetRef(ThePage!Layers.Visible[7]),NOT(ThePage!Layers.Visible))+SETF(GetRef(ThePage!Prop.ShowSC),NOT(ThePage!Prop.ShowSC))
as formulas grow more complex, you can break them
user.formula1 = setf(getref(<blaha>),<blah1>))
user.formula2 = setf(getref(<blahb>),<blah2>
etc
actions.x = setf(getref(actions.x.checked),not(actions.x.checked)) + user.formula1 + user.formula2 + <etc>
helps with debug
Many thanks Guys,
I already tried the "+" and the result is partial, it's good to know I'm on the right path.
The Prop.ShowSC toggles perfectly though both states, yet the layer hides but won't toggle back.
Actually I found the problem
This works on its own:
Actions_Row_2=SETF(GetRef(ThePage!Layers.Visible[7]),NOT(ThePage!Layers.Visible))
But combined with the other via + I need to be specific with layer 7:
Actions_Row_2=SETF(GetRef(ThePage!Layers.Visible[7]),NOT(ThePage!Layers.Visible[7]))
So the final working line is:
=SETF(GetRef(ThePage!Prop.ShowSC),NOT(ThePage!Prop.ShowSC))+SETF(GetRef(ThePage!Layers.Visible[7]),NOT(ThePage!Layers.Visible[7]))
Thanks again :)
in general, having multiple action buttons affecting a common cell is tricky
usually, its better to have actions set their own check marks....then in the common cell, look at all checkmarks
and decide what to do