Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Simon Dingley 1431 posts 3332 karma points c-trib
    Apr 12, 2010 @ 15:05
    Simon Dingley
    0

    Advice on creating complex datatype

    I am looking for some advice on how to best approach creating a complex datatype. I have built only simple data types before but this requirement requires dependency on previous selections and all values need to be stored in order for the hierarchy to redisplayed later on. The datatype is for a Member property and would form the following structure:

    Cat 1
      |- Cat 2
          |- Cat 3

    Cat 2 options would be dependent on Cat 1 selection and Cat 3 dependent on Cat 2. In some cases there may never be a Cat 2 option and likewise for Cat 3. In terms of storing this in the database my first thought would be to store values as a delimeted string but before I go to far I was hoping for some feedback or alternative ideas.

    Thanks, Simon

  • Dirk De Grave 4537 posts 6006 karma points MVP 3x admin c-trib
    Apr 12, 2010 @ 16:50
    Dirk De Grave
    1

    Hi Simon,

    I wouldn't make it too overly complex and also go for the simple solution, being a custom datatype with three dropdowns and storing data as delimited string, as this is closest to the umbraco infrastructure/architecture. A custom table to hold the category info would be overhead imho, 

     

    Hope this helps.

    Regards,

    /Dirk

  • Simon Dingley 1431 posts 3332 karma points c-trib
    Apr 12, 2010 @ 17:05
    Simon Dingley
    0

    I'm glad you said that as I was hoping there would be little need to make it any more complex than that.

  • Jesper Hauge 298 posts 486 karma points c-trib
    Apr 12, 2010 @ 21:44
    Jesper Hauge
    1

    But don't you still need some place/way to store which cats/options hierarchy, in order to present the user with the option lists in the control dropdowns?

    I'd probably look into a using a custom xml-file for this hierarchy, and then storing the option-ids as a delimited string from the datatype as Dirk suggested.

    Regards
    Jesper Hauge

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies