I want to store the variable name in a string and then evaluate the result. I have the following:
var @subscriber_key, @lookupFields, @first, @second, @rs set @subscriber_key = AttributeValue("subscriber_key") set @lookupFields = "subscriber_key;@subscriber_key" IF IndexOf(@lookupFields, ";") > 0 THEN SET @rs = BuildRowsetFromString(@lookupFields,';') SET @first = Field(Row(@rs,1),1) SET @second = Field(Row(@rs,2),1) ENDIF ]%%
First: %%=v(@first)=%% Second: %%=v(@second)=%%
First: subscriber_key Second: @subscriber_key
Which is technically correct but what i want is
@subscriber_key to be evaluated as well.
First: %%=v(@first)=%% Second: %%=v(@=v(@second)=)=%%
but this returned empty string. If the variable
@second holds the variable name of the variable i want to call, how do get that value. For example; the value of
%%=v(@subscriber_key)=%% should be
subscriber_1234. So i want that to be returned when i get the value for @second; the key here is that it may not always be
subscriber_key or a variable that i know of so i am trying to indirectly reference and evaluate the variable stored in the string.