Get the selected customers as a filter to record variable

sunct
Member Posts: 72
Hi,
I have a particular case where I need to open a customer list form from another form and make selection of some customers and this selection need to return to the first point where I need to use it as a filter for a customer record variable. It works well when I have a few customers to select, but when a huge number of customers need to select, it doesnot work since it throws over flow error for the string variable I am using to return the selection filter to the first function. What could be a work around for this? I tried using an array of string variables, but the problem is that I am not able to use that as a filter in the Setfilter. Appreciate any help on this.
Thanks in Advance
](*,)
I have a particular case where I need to open a customer list form from another form and make selection of some customers and this selection need to return to the first point where I need to use it as a filter for a customer record variable. It works well when I have a few customers to select, but when a huge number of customers need to select, it doesnot work since it throws over flow error for the string variable I am using to return the selection filter to the first function. What could be a work around for this? I tried using an array of string variables, but the problem is that I am not able to use that as a filter in the Setfilter. Appreciate any help on this.
Thanks in Advance
](*,)
Regards,
Sunil
Sunil
0
Comments
-
I would pass the result set back as a temporary table.David Singleton0
-
Hi David,
Thanks for your reply.
I didnt get what you mean by that. Could you please explain? How the temporary variable will get filtered recordset in my form?Regards,
Sunil0 -
Temporary table is the way to go but you can take a look at Form 22 Customer List. There are 2 Functions there GetSelectionFilter and SetSelectionFilter. GetSelectionFilter will take the selection and put in .. where appropriate instead of all |. Depending on what is being filtered this may avoid your overflow error (or at least reduce it). You call this Function like this maybe from the OnLookup trigger:
CustomerList.LOOKUPMODE(TRUE);
IF NOT (CustomerList.RUNMODAL = ACTION::LookupOK) THEN
EXIT(FALSE)
ELSE
Text := CustomerList.GetSelectionFilter;
EXIT(TRUE);Jason Wilder
jwilder@stonewallkitchen.com0 -
sunct wrote:Hi David,
Thanks for your reply.
I didnt get what you mean by that. Could you please explain? How the temporary variable will get filtered recordset in my form?
So try it, you can't expect to be just spoon fed.
Step one is to learn Navision. once you know the App, you will know where to find the ideas.David Singleton0 -
thanks David.
I solved it yesterday itself. thanks for your valued reply.
RegardsRegards,
Sunil0 -
Hi Jason,
Thanks for your reply. I have tried that solution first, but the problem was that I had around 3000 customers in the list and selecting all (in some particular cases) cross the limit of the variable size. That is when I thought about a way around. But it helped when I use a temperory record vaiable to store all the records from the customer list and then return this variable to my fist function to use it as a filter.
Once more thanks for your help.
Regards,
SuneeshRegards,
Sunil0 -
sunct wrote:Hi Jason,
Thanks for your reply. I have tried that solution first, but the problem was that I had around 3000 customers in the list and selecting all (in some particular cases) cross the limit of the variable size. That is when I thought about a way around But it helped when I use a temperory record vaiable to store all the records from the customer list and then return this variable to my fist function to use it as a filter.
Once more thanks for your help.
Regards,
Suneesh
Suneesh,
I hope you did get a solution. The point is to ask for hints and to get help with specific stumbling blocks or bugs or error messages. The only way you will learn and become better is if you take the hint and try it out and experiment until it works.
I know its tough, but its the proper way.
I hope you know the saying 'give a man a fish and you feed him for a day, teach him how to fish and you feed him for life.'David Singleton0 -
Hello David,
Thanks for you reply. Infact, I was in a wrong way of getting a solution using a variable to set the filter. Your reply gave me the idea of using the temperory variable and I realised that it is a simple solution tooOnce I got the idea, it was implemented pretty soon. And, thanks for giving the idea. Hope for your support in future too. Thanks
RegardsRegards,
Sunil0 -
sunct wrote:Hello David,
Thanks for you reply. Infact, I was in a wrong way of getting a solution using a variable to set the filter. Your reply gave me the idea of using the temperory variable and I realised that it is a simple solution tooOnce I got the idea, it was implemented pretty soon. And, thanks for giving the idea. Hope for your support in future too. Thanks
Regards
:thumbsup:David Singleton0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions