Count Items in Context Only
-
- Posts: 1460
- Joined: Tue Jan 24, 2017 5:51 am
- Location: 'Stralya
Count Items in Context Only
Is there a way to count only the items that are in Context or do I have to count all the BOs based on the criteria that I had them in Context?
Re: Count Items in Context Only
Immediately after the find try interrogating SEARCH_COUNT
It can be useful to stop unnecessary processing if the search doesn't find anything
IF SEARCH_COUNT >0 THEN .......
and if you need to persist the number during the process , try stuffing into a non persisting Bo Attribute because the number will change the next time you do a find on another BO
So CREATE NPBO WITH NPBO.Attribute1 = SEARCH_COUNT
It can be useful to stop unnecessary processing if the search doesn't find anything
IF SEARCH_COUNT >0 THEN .......
and if you need to persist the number during the process , try stuffing into a non persisting Bo Attribute because the number will change the next time you do a find on another BO
So CREATE NPBO WITH NPBO.Attribute1 = SEARCH_COUNT
Last edited by rocketman on Thu Oct 26, 2017 11:33 am, edited 1 time in total.
Rocketman
V8.7 Developer Edition. Server 2016 Standard edition. MySql 5.5
V8.7 Developer Edition. Server 2016 Standard edition. MySql 5.5
-
- Posts: 1460
- Joined: Tue Jan 24, 2017 5:51 am
- Location: 'Stralya
Re: Count Items in Context Only
Brilliant. Thank you.