Results 1 to 3 of 3
  1. #1

    How to create dictionary objects using data table

    Hi I like to create a number of dictionary objects where the name of the object and also item and value pairs are all in a QTP data table. In essence I would like to get the name of the objects from the table; create an object using the table entry for the object name and then populate it with the data for each object.

    To illustrate the point I use an array instead:
    I like to create objects whose names are shown in the array below.

    Dim objArr
    objArr = Array("obj1","obj2","obj3","obj4")

    Dim obj
    For each obj in objArr
    execute("Dim " & obj)
    set obj = CreateObject(Scripting.Dictionary)
    obj.add "item1", "value1" ' <-- these come from table
    obj.add "item2", "value2"

    This makes "obj" a dictionary object ;whereas I wanted to create dictionary objects named "obj1", "obj2", so on.

    Thanks for help on this.

  2. #2

    Re: How to create dictionary objects using data ta

    You never specified exactly what the issue are you getting?

  3. #3
    Advanced Member
    Join Date
    Sep 2007
    Chennai, Tamil nadu, India

    Re: How to create dictionary objects using data ta

    i have never seen bugs sleeping



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
BetaSoft Inc.
All times are GMT -8. The time now is 07:29 PM.

Copyright BetaSoft Inc.