Graphics

 View Only
  • 1.  Use Visual Logic to search though datalinq

    Posted 03-27-2020 21:22

    using v8.5 currently

    I have an xml file that is updated regularly. The end goal is to create a drop down list of States that someone can select, and have the graphic fill itself with the attribute by State. the data is structured like this:
    States
    | State
     || id = number
     || StateName
     || StateAttribute1
     || StateAttribute2

    Unfortunately the data is ordered by the value of one of the state attributes, and the id is not a unique identifier but instead the position of the State in the States array. How can I use visual logic or a script to search through this by StateName? 



  • 2.  RE: Use Visual Logic to search though datalinq

    Posted 03-27-2020 21:32

    Could you not just use a datalinq key and enter the state name into the field to get the information you want?  Send a link to the XML, and I should be able to tell you how to pull whatever data you want.  While the id may not be unique, the state name is going to be accurate. - So it is not even visual logic or a script. - Now if you are trying to list this in a table of like the most, then things would get more complicated.


    #XPression


  • 3.  RE: Use Visual Logic to search though datalinq

    Posted 03-27-2020 21:45

    i cant send a link to the file but here are two blocks copied from the file. I tried to use datalinq Kays but i couldnt properly figure it out because all of the items are siblings, and im not familiar enough with Datalinq keys to run a search based of off siblings (i.e show me the population of the state named "New York")

    <StateList>
    <State>
      <Id>1</Id>
      <stateName>New York</stateName>
      <population>19453561</population>
    </State>
    <State>
      <Id>2</Id>
      <stateName>New Jersey</stateName>
      <population>8882190</population>
    </State>
    </StateList>


    #XPression


  • 4.  RE: Use Visual Logic to search though datalinq

    Posted 03-27-2020 22:27

    Sorry for delay. - So I retyped your XML information into XML notepad to make a local XML file.   Makes it tough to not have the original.  You will see what I mean with Datalinq Key to add in the state name in order to type in a name and then pull that data.  There are newer features in v9.0 that allow you to do text macros that might be helpful for something like this.

    Let me know if this makes sense or not.  I added to your list by typing out to 5 states just to make sure it works, and it is working on my end.


    #XPression