Problem with comparing variables in Windows version

End user supplied how to documents and discussion.

Problem with comparing variables in Windows version

Postby newsound » Mon Feb 04, 2008 11:40 pm


I am evaluating the Windows version of QK (3.0.3), and have run into a problem that should be straight forward to do, but I am having troubles.

I have a variable (TOTALREPS) that gets assigned a number based on the found count in a Filemaker pro database. It gets assigned fine from the clipboard. I then have 2 more variables REPCOUNT and SUBCOUNT. REPCOUNT gets assigned the value of 1 in step 1 of the macro. The macro then processes a number of other commands, then assigns SUBCOUNT the value of REPCOUNT, and then assigns REPCOUNT to the value of SUBCOUNT +1. In watching the variables window during debug, all of this happens fine, until the next step (18). Step 18 does a compare of REPCOUNT and TOTALREPS. The equation should be REPCOUNT<=TOTALREPS. If the step succeeds (evaluates to true), then it should loop back to step 15 and walk through the steps again. However, no matter how I set the equation, it always fails! I've done this type of loop programing forever in other programs, so what am I missing here?

Posts: 1
Joined: Sun Feb 03, 2008 3:16 pm

Postby gb2 » Wed Feb 06, 2008 1:53 pm

looks like this is a known problem when comparing two variables. Entered in the database as ID - 4116

see if this doesn't work for you:

1) create a variable named compareResult
2) replace your compare step with an Assign step that is compareResult = REPCOUNT<=TOTALREPS
3) then the next step create a Compare step that is compareResult == -1

-1 is returned when your statement REPCOUNT<=TOTALREPS is true and 0 when it is false.
User avatar
Site Admin
Posts: 2869
Joined: Mon Feb 06, 2006 6:22 pm

Postby templeowlchick06 » Fri May 29, 2009 3:29 pm

Tried this and it doesn't work for me.. Please read my other post. Compare Variable does not seem to work
Posts: 3
Joined: Fri May 29, 2009 3:14 pm

Return to QKW How Tos

Who is online

Users browsing this forum: No registered users and 1 guest