How show different ENUM lists based on variable in input form?

HeleneHH

26-05-2020

How can I decide what enum list to show in a delivery based on a variable I have in the input form?

I don't need anything for creating/changing the enum values or the enum lists themselves. ONLY the path itself that leads to a existing Platform Enumeration list. So the path itself should be the only thing that could be different based on the variable.

Right now I am able to show the enum list (from Enumerations under Platform) and be able to chose between the enums with this:

(I have changed names to make it easier to understand)

In delivery schema:

 

<attribute dbEnum="xtk:enum:one_keyword"
           label="Keyword" length="100" name="keyword"
           type="string"/>

 


In delivery Input form:

 

<container colspan="1">
      <input label="Keyword" xpath="@one_keyword"/>
</container>

 


The enum list is in Platform-->Enumerations and not made in the schema, since I am dependent on not having to change the schema to add/change enum values. (So I am not currently using <enumeration></enumeration> )


But I want to be able to, based on a variable (e.g that's stored in /tmp/ in the input form) or similar, to change the path to the enum list that will be displayed.

So, if the variable I have has the value "one", I want this to be the chosen displayed enum list path:
"xtk:enum:one_keyword"

If the variable's value is "two"
"xtk:enum:two_keyword"

If the variable's value is "three"
"xtk:enum:three_keyword"

 

... and so on.

Kind of like this if that was possible, or something similar:
"xtk:enum:"+enumVar+"_keyword"

Or if I could define the dbEnum directly in the input form instead of in the schema, that would also be nice! Is this possible?

I will have maybe 20 different enum lists, so would be great if there's a way without making 20 attibute copies.

Would really appreciate replies and suggestions!

Adobe Campaign Classic dbEnum enumeration Input Form
View Entire Topic

Jyoti_Y

MVP

03-06-2020

Hi,

 

Do you need to do this in input form?

 

If you ultimate aim is to add Platform enumerations based on different variables, you can achieve this via Javascript also.

Design a JS: which will insert values in xtk:enum based on variable passed.

There are two approach possible:

1) Pass list of variable in workflow and perform insert operation in xtk:enum using JS activity.

2) Use SOAP call to your JS function which will perform insert on each variable value.

 

Thanks.