SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 4 of 4
  1. #1
    Member
    Join Date
    Jan 2003
    Location
    Chicago
    Posts
    169
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Modularzing script with active data calls

    Has anyone had any success with modularzing a script that reads in active data?

    I have many scripts that read in ActiveData, but I haven't been successful in throwing the script into a module and just calling it.

    Here is what I have written, but when I run, I get an 'object required' error. I've tried several variations, but to no avail.

    Here's what is in the module:
    <font class="small">Code:</font><hr /><pre>
    Sub populateClaimData(ByVal activeData1 As String)
    'Create new claim
    createNewClaim (activeData1_Row.GetString("claimType"))
    'Populate claim number
    populateClaimNumber (activeData_Row.GetString("claimnumber"))
    'Populate PT ln
    populatePtLN (activeData_Row.GetString("ptLN"))
    'Populate pt fn
    populatePtFN (activeData_Row.GetString("ptFN"))
    'populate middle initial
    populatePtMI (activeData_Row.GetString("ptMI"))
    'Populate state
    populatePtState (activeData_Row.GetString("ptState"))
    'populate zip code
    populatePtZipCode (activeData_Row.GetString("ptZC"))
    'populate pt dob
    populatePtDOB (activeData_Row.GetString("dob"))
    'populate pt gender
    populatePtGender (activeData_Row.GetString("ptSex"))
    End Sub

    </pre><hr />


    Here is the script that calls it:
    Sub Main()

    Dim result As Boolean
    Dim EOR800_Row As TActiveDataRow
    Dim EOR800_ActiveData As TActiveData

    Set EOR800_ActiveData = LoadActiveData("EOR800")
    ' Loop thru active data
    For Each EOR800_Row In EOR800_ActiveData
    Call populateClaimData(EOR800)
    'Do a bunch of things here

    Next

    End Sub

  2. #2
    Member
    Join Date
    Jan 2003
    Location
    Chicago
    Posts
    169
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Modularzing script with active data calls

    Well,
    after playing some more, I resolved invalid object error - I was passing a variable [that wasn't assigned a value]. Discovered this when I set Option Explicit.

    I changed the module to the following, but When I run this thru the debugger, the actual value of the active data is not being passed. So if you look at createClaim call, my script is actually passing this value to the function: EOR800__Row.GetString and not the data associated with the claimType active data element.

    <font class="small">Code:</font><hr /><pre>
    Sub populateClaimData(ByVal activeData1 As String)
    'Create new claim
    createNewClaim (activeData1 &amp; "_Row.GetString" &amp; ("claimType"))
    'Populate claim number
    populateClaimNumber (activeData1 &amp; "_Row.GetString" &amp; ("claimnumber"))
    'Populate PT ln
    populatePtLN (activeData1 &amp; "_Row.GetString" &amp; ("ptLN"))
    'Populate pt fn
    populatePtFN (activeData1 &amp; "_Row.GetString" &amp; ("ptFN"))
    'populate middle initial
    populatePtMI (activeData1 &amp; "_Row.GetString" &amp; ("ptMI"))
    'Populate state
    populatePtState (activeData1 &amp; "_Row.GetString" &amp; ("ptState"))
    'populate zip code
    populatePtZipCode (activeData1 &amp; "_Row.GetString" &amp; ("ptZC"))
    'populate pt dob
    populatePtDOB (activeData1 &amp; "_Row.GetString" &amp; ("dob"))
    'populate pt gender
    populatePtGender (activeData1 &amp; "_Row.GetString" &amp; ("ptSex"))
    End Sub

    </pre><hr />

  3. #3
    Senior Member
    Join Date
    May 2005
    Location
    Manchester, UK
    Posts
    122
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Modularzing script with active data calls

    Hi Nadia,
    This is probably going to be really stupid question, but it's post xmas and I've slept since I last looked at work!
    Are you writing keyword driven sub procedures here? I think I'm doing something similar but it is a little more longwinded than this.
    The part that says

    createNewClaim (activeData1 &amp; "_Row.GetString" &amp; ("claimType"))

    is createNewClaim going off into another subprocedure, or is this referring to a mapped object?
    Would love to know a little more about how yours is set up? Perhaps PM if it's easier?

    Thanks

    Zoe
    Using:
    TestPartner 6.3, Visual Tests
    Application under test: Client/Server based, C# .Net App with Infragistics Presentation layer
    Database: SQL 2000/2005

  4. #4
    Member
    Join Date
    Jan 2003
    Location
    Chicago
    Posts
    169
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Modularzing script with active data calls

    Zoe,
    createNewClaim is a function call [-function resides within a module].

    Essentially, my script reads active data, and I call many functions [that are in a module] that populates fields with the active data.
    What I struggle with doing is taking this whole routine to another level - i.e the reading of active data and populating the fields to a module level, perform this very action.

    Hope that is helpful to you.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 10:09 AM.

Copyright BetaSoft Inc.