Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Correcting If statement looking for multiple strings
#5
Solved: 12 Years, 10 Months, 3 Weeks ago
@anemuday

Thxc for the idea. I tried your suggestion but I get a Run Error:

Type mismatch: '[string: "CLIENT DOCUMENTS - W"]'

Function file: O:\QTP Tests\LibraryImageAccessTests-6.qfl
Line (156): " str="CLIENT DOCUMENTS - WBS" or "COMMISSION REPORTS BY SUB / BRANCH / REP" or "BRANCH REPORT SEARCHES" or "SUB-FIRM REPORT SEARCHES" or "FIRM REPORT SEARCHES"".

Not sure why. Any other ideas? ;-)

@ ravi

I tried
Code:
GroupName = DataTable.GetSheet("Action1").GetParameter("GroupName").ValueByRow(Gr)
If not strcomp(GroupName,"CLIENT DOCUMENTS - WBS",1)=0 or strcomp(GroupName, "COMMISSION REPORTS BY SUB / BRANCH / REP",1)=0 or strcomp(GroupName,"BRANCH REPORT SEARCHES",1)=0 or strcomp(GroupName, "SUB-FIRM REPORT SEARCHES",1)=0 or strcomp(GroupName, "FIRM REPORT SEARCHES",1)=0 then

but this errored also
Reply


Messages In This Thread
RE: Correcting If statement looking for multiple strings - by mv8167 - 11-03-2011, 02:37 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
Wink compare strings and perform action Forrest Gump 4 28,074 09-06-2011, 11:55 AM
Last Post: Rohan
  If statement with multiple conditions mv8167 4 14,195 08-20-2011, 08:34 PM
Last Post: Arul

Forum Jump:


Users browsing this thread: 1 Guest(s)