mibuso.com

Microsoft Business Solutions online community
It is currently Fri May 24, 2013 9:00 am

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: see the total number of elements
PostPosted: Tue Mar 12, 2013 1:05 pm 
Offline

Joined: Sun Feb 12, 2012 9:42 pm
Posts: 13
Country: Switzerland (ch)
Hallo, it should be a very basic functionnality but, if there is, I cannot see it.
Is there a wa to see the total number of a selection?
For example, when I select the customer list, is it possible to see the total number of customers? Is there another way to do that?
Than you
Max


Top
 Profile E-mail  
 
 Post subject: Re: see the total number of elements
PostPosted: Tue Mar 12, 2013 1:08 pm 
Offline

Joined: Thu Aug 12, 2010 1:45 pm
Posts: 77
Location: Mumbai
Country: India (in)
Form.SETSELECTIONFILTER(CustomerRec);
CustomerRec.COUNT;


Top
 Profile E-mail  
 
 Post subject: Re: see the total number of elements
PostPosted: Tue Mar 12, 2013 2:18 pm 
Offline

Joined: Sun Feb 12, 2012 9:42 pm
Posts: 13
Country: Switzerland (ch)
Sorry but it is only my first week with Navision...
Where should I put this code?
I tryied to create a new label and put it in the c/ on the onPush() function but the variable won't work
Thank you very much.
Max


Top
 Profile E-mail  
 
 Post subject: Re: see the total number of elements
PostPosted: Tue Mar 12, 2013 2:59 pm 
Offline

Joined: Thu Aug 12, 2010 1:45 pm
Posts: 77
Location: Mumbai
Country: India (in)
1. Go to customer list form
2. Add a new button and go to push action trigger
3. Add a local record variable "Cust" Customer subtype
4. Add below code
Code: Select all
Cust.RESET;
CurrForm.SETSELECTIONFILTER(Cust);
MESSAGE(FORMAT(Cust.COUNT));


Top
 Profile E-mail  
 
 Post subject: Re: see the total number of elements
PostPosted: Tue Mar 12, 2013 3:35 pm 
Offline

Joined: Sun Feb 12, 2012 9:42 pm
Posts: 13
Country: Switzerland (ch)
Thank you very much!! :lol:

without:
CurrForm.SETSELECTIONFILTER(Cust);

it will give me all the records,otherwise I have to select alla to have the count
Tanks Max


Top
 Profile E-mail  
 
 Post subject: Re: see the total number of elements
PostPosted: Tue Mar 12, 2013 4:45 pm 
Offline
MVP Microsoft Dynamics NAV
Site Supporter

Joined: Fri Jun 06, 2003 9:01 pm
Posts: 6979
Location: L.I., New York
Country: United States (us)
It's even easier than that.

On the List add a textbox at the bottom with sourceexp = COUNT

Set your glues to bottom & left

Save-Compile->Enjoy


Attachments:
CustCount.JPG
CustCount.JPG [ 22.37 KiB | Viewed 317 times ]
CustCount.JPG
CustCount.JPG [ 28.4 KiB | Viewed 319 times ]

_________________
Harry Ruiz
http://www.cosmeticsolutions.com
http://www.autismspeaks.org
Top
 Profile E-mail WWW  
 
 Post subject: Re: see the total number of elements
PostPosted: Tue Mar 12, 2013 6:07 pm 
Offline

Joined: Thu Aug 12, 2010 1:45 pm
Posts: 77
Location: Mumbai
Country: India (in)
sarto76 wrote:
Is there a wa to see the total number of a selection?
Max
I assume you need count for only selected records. Maybe I misinterpreted


Top
 Profile E-mail  
 
 Post subject: Re: see the total number of elements
PostPosted: Tue Mar 12, 2013 6:11 pm 
Offline
MVP Microsoft Dynamics NAV
Site Supporter

Joined: Fri Jun 06, 2003 9:01 pm
Posts: 6979
Location: L.I., New York
Country: United States (us)
sarto76 wrote:
For example, when I select the customer list, is it possible to see the total number of customers? Is there another way to do that?


I was going by this question.

And if by selection he means filter then the Count would work too.

Say he filters on a specific salesperson code.
The list will show just that salesperson and the "count" of that salespersons accounts.

That's what I'm thinking. If he want's to select a few, he could "mark" them & on View->Marked - the count will still be correct. No buttons needed.

_________________
Harry Ruiz
http://www.cosmeticsolutions.com
http://www.autismspeaks.org


Top
 Profile E-mail WWW  
 
 Post subject: Re: see the total number of elements
PostPosted: Tue Mar 12, 2013 6:23 pm 
Offline

Joined: Thu Aug 12, 2010 1:45 pm
Posts: 77
Location: Mumbai
Country: India (in)
Savatage wrote:
sarto76 wrote:
For example, when I select the customer list, is it possible to see the total number of customers? Is there another way to do that?


I was going by this question.

And if by selection he means filter then the Count would work too.

Say he filters on a specific salesperson code.
The list will show just that salesperson and the "count" of that salespersons accounts.

That's what I'm thinking. If he want's to select a few, he could "mark" them & on View->Marked - the count will still be correct. No buttons needed.

The purpose was just the show the use of SETSELECTIONFILTER. Button could be the easiest trigger.


Top
 Profile E-mail  
 
 Post subject: Re: see the total number of elements
PostPosted: Tue Mar 12, 2013 7:02 pm 
Offline
MVP Microsoft Dynamics NAV
Site Supporter

Joined: Fri Jun 06, 2003 9:01 pm
Posts: 6979
Location: L.I., New York
Country: United States (us)
Here's a vid (I don't know what youtube did it's kinda screwy) but you'll get the idea how it works for us.

As i filter on different salespeople the list changes, therefore the count changes.

http://www.youtube.com/watch?v=E15JL_rq ... e=youtu.be

_________________
Harry Ruiz
http://www.cosmeticsolutions.com
http://www.autismspeaks.org


Top
 Profile E-mail WWW  
 
 Post subject: Re: see the total number of elements
PostPosted: Tue Mar 12, 2013 8:20 pm 
Offline
MVP Microsoft Dynamics NAV
Site Supporter

Joined: Fri Jun 06, 2003 9:01 pm
Posts: 6979
Location: L.I., New York
Country: United States (us)
It works for selection also.

Make a selelection - Hit CTL-F1 (now those records are marked)
goto View-> Marked Only

now your count is showing the number of selected accounts.

So it has multiple uses :lol:

_________________
Harry Ruiz
http://www.cosmeticsolutions.com
http://www.autismspeaks.org


Last edited by Savatage on Tue Mar 12, 2013 8:29 pm, edited 1 time in total.

Top
 Profile E-mail WWW  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: Exabot [Bot] and 25 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum


Search for:
Jump to:  
cron