Forum Discussion
- YMinaevStaff
Hi,
Check whether the values you get from Excel are empty before trying to use them. To do this, use the aqObject.GetVarType method.
- gurvin_netOccasional ContributorI saw one of the post about using aqObject.GetVarType validation before creating my post. The problem is that my form has 50+ fields. 95% of the fields are not mandatory. I have to test both scenario blank and not blank and make sure database stores correct values.
If I am not wrong then your recommendation will involve putting 50 verification for 50 columns. That is not efficient. I have to test 20-30 forms like this one. - YMinaevStaff
Hi,
You get values from Excel in a loop, right? Just insert this validation right after the line which reads the current value on the current iteration.
There's no other way to check whether values are empty. - gurvin_netOccasional ContributorHi,
I am sorry, not clear. I used KeywordTest - data driven loop to read values from excel sheet. Pls show me how to use validation code ( aqObject.GetVarType ) here.
Thanks - YMinaevStaff
Hi,
You need to insert an 'If... Then' operation to your data-driven loop. In the operation's condition specify the following:
Value1: Table Data - select your DB Table variable here.
Condition: not equal to
Value2: null
This will check whether the current value is empty. - karaOccasional ContributorThis was working fine for me in the last release. I just needed to put a ' in the excel spreadsheet for any empty fields. Now, I've just upgraded to V. 9.30.3373.7 and I get a type mismatch for every empty field whether there is an apostrophe or not. This is very annoying. I have to test for fields not getting entered by the user and I can't.
Related Content
- 7 years ago
- 4 years ago
- 10 years ago
- 8 years ago
- 11 years ago
Recent Discussions
- 3 hours ago