3

I have a season schema in which episodes is an multivalued embeddable field. Episode schema is further having pricing as embeddable field. In Pricing schema there is a drop down list field which is fetching values from category named 'CurrencyType', The default value for currency type field is keyword 'USD' which was created in 010 Schema Master. Other keywords in currency type category are created in 030 content master. While creating season component, the first episode shows the correct default value for currency type field i.e. USD. But as Episode is a multivalued field, when I add second episode then instead of default value in pricing i.e. 'USD' it shows other keyword selected i.e. 'CAD'

enter image description here

When I add second episode instead of Default value i.e. 'USD' which is higlighted in above image, it shows some other keyword i.e. 'CAD'

1 Answer 1

2

The behavior of default values for Schema fields is that it will be set by a trigger, which is the first instance (i.e. load) of the Schema.

So you see when you have your first episode (loading the Episode and the Pricing Schema for the first time), that your default value for currency is set to its default value. However when you add a second episode, the embedded pricing Schema has already been loaded before. Hence the default value mechanism isn't triggered for that field anymore, and since it is a mandatory field, the first value (alphabetically) of the dropdown will be automatically selected, which in your case must be 'CAD'.

So what you are seeing is expected behavior unfortunately.

5
  • I want USD to be selected by default for every episode I add. Is it possible?
    – AlokBhatt
    Commented Jul 19, 2013 at 8:58
  • Not without you building something for it, only thing I can think of which could do it is a UI extension, but it won't be easy. Commented Jul 19, 2013 at 9:04
  • @BartKoopman do you know if changing this is on a list of feature enhancements we might see any time soon? This is the type of 'quirk' with the cme that drives editorial users of Tridion at my company nuts. Commented Jul 20, 2013 at 2:54
  • @GlennStevens I don't see an idea for it posted on ideas.sdltridion.com so I don't think this is on anybodies list. Commented Jul 22, 2013 at 7:38
  • I have submitted an idea to the site on this Multi-value Embedded schema default value. Hopefully they will build this. Commented Oct 10, 2014 at 20:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.