Forum Discussion
A couple of things. If there is a 1 (patient) to many (address) relationship, then the record number where you start won't be the same for the 2 tables. Also, I would recommend using Excel or csv files instead of Table variables. I have had issues when attempting to edit integer values within a Table variable. (After editing an integer within a Table variable, TC no longer recognizes the value as an integer - I have submitted a support case for this. This occurs in both TC 10 and 11.) Also, you can more easily sort and edit Excel files.
Instead of using a While loop, you can accomplish what you want using nested DDT commands. The first DDT command will read the records of the Patient table while the second (nested) DDT reads the Address table. You can use an If Then command within the second (nested address) DDT to only read the address records matching the MRN of the Patient table. See the attached screen print for a possible KWT solution. This option doesn't run as fast as I would like, but it does work. I think if you work with a scripted version of the above solution, it would run quite a bit faster. Good luck.
Yes, the relationship is 1 (patient) to many (address). Which is why I need them to match up. It has been hard trying to figure out how to do this with Table Variable and inside Keyword tests. I'm not very familiar with TestComplete. I have found the same issue with Table variables as you and have to do a conversion to int in order to overcome it.
I like the idea of doing two DDT instead of a DDT for the Patient and While loop for the Address. I will definetly try that out to see if it works. For now I'm not able to change the Table variable in this test suite because there is too much in changing things around. For future tests I'm not going to use the Table variable because of the limitations I've been having with it. It just doesn't work for what I need to do.
Thank you very much everyone for answering my question and helping me get this figured out.
Related Content
Recent Discussions
- 12 hours agoashly