variables assigned to other variables

Please post all questions and comments regarding Help & Manual 7 here.

Moderators: Alexander Halser, Tim Green

Post Reply
Catherine F
Posts: 1
Joined: Wed May 08, 2019 3:00 pm

variables assigned to other variables

Unread post by Catherine F »

Is it possible to assign a variable to another variable? If so, how would I set that up?

Here is my scenario...
I've created a variable called SME and reference it at the top of every topic.
It has a value established at the configuration level to be displayed as a default value ... i.e. John Smith.
Then on each topic I override that value with the name of the true Subject Matter Expert ... i.e. Terry Jones.

Since the people may change over time, I'd like to...
Keep the SME variable defined and placed as is.
Create additional text variables for the "roles"... i.e. SME_Research
Establish the value of the "role" variable in configuration... so that SME_Research now is Terry Jones.
Then on each topic override the SME variable with the new "role" variable... so use <%SME_Research%> instead of "Terry Jones".

That way, when Terry Jones leaves or changes roles, I can update the SME_Research variable in configuration and have it apply where ever necessary. Otherwise I have to hunt for each topic that has the SME variable overriden with "Terry Jones".

Does that make sense?
User avatar
Tim Green
Site Admin
Posts: 23155
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: variables assigned to other variables

Unread post by Tim Green »

Hi Catherine,

You can definitely use variables as the values of variables. Just type in the variable name using the standard syntax <%VARIABLE_NAME%> in the variable definition, or in the topic variables where you redefine it. So, for example, you could have a basic plain text definition for your SME variable, or even a variable definition right from the get-go. Then in the topic variable redefinition, you can define that either directly or with another variable.

The only thing you need to be careful about are circular references: Defining VAR1 with VAR2 and VAR2 with VAR1 will take you down a rabbit hole, of course... 8)
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Post Reply