I am aware that in NAV, SETSELECTIONFILTER will MARK records that have been selected from a list form, but the issue I am having a problem with is that it doesn’t MARK records if they are all selected at once (by clicking the upper left-hand corner of the table box)
Does anyone know a way that I could programatically detect if a user selected all records in this manner and MARK them?
Thanks for any help.
If all records in your form are selected, NAV does not MARK them. Try and place this sample code on a CommandButton and some form, to see the different filters NAV returns to you:
Thank you Soren,
As I mentioned, I know about the fact that Nav doesn’t mark recs if all are selected. I am looking for a way to detect when the user has in fact selected all.
Do you know of a way?
how about comparing the number of records?
REC2 := REC;
If the result turns YES it means the user has selected all records in the form…
Any other scenarios than “selecting all” returns marked records. That should make it pretty easy to figure out what the user did.
But unfortunately, there are in fact TWO scenarios for which no records will be marked.
Not Selecting Any
Therefore, it is not “pretty easy” to figure out what the user did. I can’t assume that if no records are MARKED, that the user selected all—maybe they just didn’t select anything.
I see. I didn’t realize that “selecting all” returned no filter, as well as, no marked recs. I thought that the filter would still return the primary key of the record that the cursor was on even if “selecting all”
Thanks, I’ll try it.