1. I have corrected the e-mail settings so that outgoing e-mails from these forums should be sent now. If you tried to Register or Reset your Password, please try again!
    Dismiss Notice

Enumerating fields

Discussion in 'Census: General Discussion' started by Lempo, Jan 27, 2012.

  1. Lempo

    Lempo Guest

    I want to do something like this - SELECT DISTINCT typeinfo.knowledgedesc FROM items WHERE tpeinfo.knowledgename LIKE '%armor%'

    Is there an efficient way to enumerate a particular field to populate a combobox with unique values from it?

    [url="census.daybreakgames.com/xml/get/eq2/item/2884803657">census.daybreakgames.com/xml/get/eq2/item/2884803657[/url]

    As an example

    <span ><span style="color: #0000ff;"><<span style="color: #990000;"><span >typeinfo<span > knowledgedesc<span ><span style="color: #0000ff;">="Cloth Armor<span ><span style="color: #0000ff;">"<span ><span style="color: #990000;"> knowledgename<span ><span style="color: #0000ff;">="verylightarmor<span ><span style="color: #0000ff;">"<span ><span style="color: #990000;"> maxarmorclass<span ><span style="color: #0000ff;">="103<span ><span style="color: #0000ff;">"<span ><span style="color: #990000;"> minarmorclass<span ><span style="color: #0000ff;">="103<span ><span style="color: #0000ff;">"<span ><span style="color: #990000;"> name<span ><span style="color: #0000ff;">="armor<span ><span style="color: #0000ff;">"<span ><span style="color: #990000;"> physicaldamageabsorption<span ><span style="color: #0000ff;">="18<span ><span style="color: #0000ff;">"<span ><span style="color: #990000;"> skilltype<span ><span style="color: #0000ff;">="verylightarmor<span style="color: #0000ff;"><span >"<span >>

    If you wanted to populate a combo box with the valid values for knowledgesc.

    [url="census.daybreakgames.com/xml/get/eq2/item/?type=Armor&typeinfo.knowledgename=/armor/">census.daybreakgames.com/xml/get/eq2/ite...dgename=/armor/[/url]

    I could break it down and exclude the specific types individually until no results were returned.

    [url="census.daybreakgames.com/xml/get/eq2/item/?type=Armor&typeinfo.knowledgename=/armor/&typeinfo.knowledgedesc=!Chain%20Armor"><span style="text-decoration: underline;"><span style="color: #800080;">[url="census.daybreakgames.com/xml/get/eq2/item/?type=Armor&typeinfo.knowledgename=/armor/&typeinfo.knowledgedesc=!Chain%20Armor"><span style="text-decoration: underline;"><font color="#800080">[url="census.daybreakgames.com/xml/get/eq2/item/?type=Armor&typeinfo.knowledgename=/armor/&typeinfo.knowledgedesc=!Chain%20Armor&typeinfo.knowledgedesc=!Leather%20Armor&typeinfo.knowledgedesc=!Cloth%20Armor">census.daybreakgames.com/xml/get/eq2/ite...=!Chain%20Armor[/url]</font>[/url][url="census.daybreakgames.com/xml/get/eq2/item/?type=Armor&typeinfo.knowledgename=/armor/&typeinfo.knowledgedesc=!Chain%20Armor&typeinfo.knowledgedesc=!Leather%20Armor&typeinfo.knowledgedesc=!Cloth%20Armor">[/url][/url]<span style="text-decoration: underline;"><span style="color: #800080;">&typeinfo.knowledgedesc=!Leather%20Armor&typeinfo.knowledgedesc=!Cloth%20Armor

    and so on

    The easy way is the select statement, but I haven't found that level of access yet.

    This is something that of course doesn't need to be ran often, and this is an easy field and just an example. Hopefully this isn't something I have glossed over.

     
  2. Dedith

    Dedith Guest

    not really, unless Dan puts that in an enumeration in the EQ2 Constants feed, then you could iterate that..

     
  3. Lempo

    Lempo Guest

    I figured that was the caase with the documention I'd saw to this point.

    It is something that is imortant to be able to do, at least IMO, but I can make a recursive routine to handle it, if he can't support it at this time.

    Far too many of the search features on the internet that use comboboxes lead people to where pressing search can lead them to an empty result set and that should never happen, the only way to prevent it is to enumerate and populate the remaining combo boxes as the user makes a selection from each box.

    Dan if you see this thread and can support this feature in some way, or can suggest a work around of some sort do chime in. :cool:

     
  4. DanKinney

    DanKinney Guest

    I will take a look.  We may need to expose a collection, kind of how we support the listing of collections.

    -dan

     
  5. Lempo

    Lempo Guest

    Thanks Dan, i think that would work just as well. Is the underlying data not an integer that resolves to the descriptive string anyway?

     

Share This Page