We're hoping to utilize Enumerations within Campaign in order to avoid the potential fat finger/extra space/capital letter issue in our querying. However, after following the necessary set-up here: Managing enumerations i'm running into some unexpected behavior (to me) and i'm looking to confirm whether or not it is how the system should perform.
We updated the schema so that one field is listed as:
<attribute dbEnum="wbmItemTypeGroupDescription" desc="Item Type Group Description Enum"
label="Sales Category" length="100" name="ItemTypeGroupDescription"
This maps correctly to the Enumeration built in the system:
- As you can see in the screenshot the enumeration is listed as 'Open' so that more values can be added in the entry screen.
However in a query activity, i have the dropdown options, but no capability to free text in a new value.
Do 'Open' enumerations not allow entry from within a query? Or is there something wrong with out set-up?
From my understanding, new values should be entered through a form (in the detail view of the element I guess), while the query is used to query already existing values.
Can you share a screenshot of your query so I can still double check and make sure of where you are trying to insert the new value from?
Yeah, that's what I assumed but was hoping I did something wrong. It seems like a shortcoming of the 'open' functionality, because the query is the most useful place for enumerations and where they most frequently need to change.
One thing I did just notice is that if I click the 'Edit Expression' button from within the 'Value' field I am able to free text a new value, however it does not allow me to save the new entry as an enumeration.
what you are asking is against the use of enumerations.
new enumeration values should only be created via forms only.
In queries, you can use the distribution values, by using little button on top right corner, next to save, in query
or you can go one step ahead and write a workflow which will automatically update your enumeration based on the distribution values in your common tables.
Thank you for the response -- I've read that document a few times, but still don't see anywhere that it calls out this should not be used for queries. In fact, the introduction talks about using these in Queries specifically as well as the benefit of setting them up as 'open': ...let you standardize the values of these fields, and help with data input or use within queries...Enumerations are called "open" if you can add values by direct input in the corresponding field.
I suspected they are only for form use, but it doesn't say that in the document, hence the post here.
With regard to the distribution values though, that is something I was unaware of -- thank you for pointing it out, alone I don't really see it being beneficial (just shows what values there are in the field) but with a workflow to automatically update the enumeration based on values in the schema that would be very useful. Is there any documentation you can point me to for setting this up?
I have never mentioned that it should not be used for queries, in fact, we use them frequently in queries, all I am saying is adding data to enumeration is like update operation, and query activity is used to execute a query(GET and SELECT) but not an update operation over data.
There is no documentation to do it, Specifically, it will be custom work. For example, write a query to do a group by with on your selected table for a specific field and then use those values and update your enumeration programmatically.
Okay sounds good -- I was confused when you said "what you are asking is against the use of enumerations"
Thanks for the info