Expand my Community achievements bar.

Who Me Too'd this topic

Avatar

Level 2

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!

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

Who Me Too'd this topic