Skip to main content

Hi Folks,
I have a string parameter sp_CommonButtonsStatus which is defined as either “Active” or “Hidden” based on a simple if-else condition and I want to use it to determine the state of a side panel as follows:

data { ( 1, displayText ) : "Common Actions",  ( 1, pageId ) : "common_buttons",  ( 1, tooltip ) : "Common Actions",  ( 1, icon ) : "aimms-play"  ,  ( 1, state ) : "sp_CommonButtonsStatus"}

Doesn’t work. Please tell me there is a simple way to do it, but I am missing it somehow 😁
Best,
Gorkem

Ok, I don’t know how I achieved this, but I’ve found it by trial-error. Just to help out the ones who will struggle in the future, you need to remove the word “data” and write the properties in between single quotes. After doing that, you can take the parameter out the double quotes and it won’t give any error. So it should be as follows:
 

​​​​​​​{ ( 1, 'displayText' ) : "Common Actions",  ( 1, 'pageId' ) : "common_buttons",  ( 1, 'tooltip' ) : "Common Actions",  ( 1, 'icon' ) : "aimms-play"  ,  ( 1, 'state' ) : sp_CommonButtonsStatus}

It works magically 🤣


Reply


Didn't find what you were looking for? Try searching on our documentation pages:

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator