Table “Person” contains :
id name language
1 Jannes dutch
2 Chris english
3 Mark english
4 Jim english
Process : "DoFindSub" with just 1 rule :
LoggedInBackofficeUser.Cnt=LoggedInBackofficeUser.Cnt + 1
Test 1)
FIND Person WHERE Person.language = ‘english’
DoFindSub
Result : DoFindSub is executed 3 times : OK
Test 2)
FIND Person WHERE Person.language = ‘dutch’
DoFindSub
Result : DoFindSub is executed 1 time : OK
Test 3)
FIND Person WHERE Person.language = ‘french’
DoFindSub
Result : DoFindSub is executed 1 time : NOK ???
LoggedInBackofficeUser.Cnt is incremented by 1
I didn't expect this behaviour.
What do you think ?
FIND records | not found | subroutine
Re: FIND records | not found | subroutine
This makes sense.
The sub routine is always going to be called.
I’m sure you’ll see this in the logger.
The third time it gets called, but it didn’t get a person record passed to it in context, but it still got called.
Just add a simple statement.
IF SEARCH_COUNT > 0 THEN DoFindSub
The sub routine is always going to be called.
I’m sure you’ll see this in the logger.
The third time it gets called, but it didn’t get a person record passed to it in context, but it still got called.
Just add a simple statement.
IF SEARCH_COUNT > 0 THEN DoFindSub
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL