Issue in MULTIPLE FILTERS - WEB SERVICE

Ravi_Thakkar
Member Posts: 392
Hello All,
By using WEB SERVICE filter concept, I know how to filter data by applying filters one at a time. I tried same to apply multiple filters. But, unable to do.
Please, help me regarding.
Thanks in Adv.
By using WEB SERVICE filter concept, I know how to filter data by applying filters one at a time. I tried same to apply multiple filters. But, unable to do.
Please, help me regarding.
Thanks in Adv.
0
Comments
-
You are passing array of filters to the webservice, what is the problem to fill more filters into this array? ;-)0
-
Thanks for the reply.
I will go through it and will let you know.0 -
Hello Kine,kine wrote:You are passing array of filters to the webservice, what is the problem to fill more filters into this array? ;-)
While binding the result of READMULTIPLE to GRIDVIEW control dataset, It will only allow to pass only one element of array as a parameter of READMULTIPLE method. Code is as follows.Sales_Order_Filter[] filter = new Sales_Order_Filter[2]; filter[0].Field = Sales_Order_Fields.No; filter[0].Criteria = "<10000"; filter[1].Field = Sales_Order_Fields.Sell_to_Customer_No; filter[1].Criteria = "<10000"; GridView1.DataSource = WS.salesorder_serv.ReadMultiple(new Sales_Order_Filter[] { filter[0] }, null, 0);
How to assign whole array in this service method?
Can you help me in this??????
Thanks in Adv.0 -
GridView1.DataSource = WS.salesorder_serv.ReadMultiple(filter);
is not enough?0 -
For my purpose, I have used 42 PAGE Web Service.
And then also, READMULTIPLE syntax is as in attachment. That is not allowing one parameter to this method.
Please, suggest.0 -
Yes, because you need to pass the bookmark (or null if you do not have one yet) and max. count of record the webservice will return. You cannot do "unlimited" records, because it can overhelm the system...0
-
Hello Kine,kine wrote:Yes, because you need to pass the bookmark (or null if you do not have one yet) and max. count of record the webservice will return. You cannot do "unlimited" records, because it can overhelm the system...
Please suggest.0 -
This is what work for me:NAV2009_Customer.Customer_Filter[] filters = {new NAV2009_Customer.Customer_Filter(),new NAV2009_Customer.Customer_Filter()};
filters[0].Field = NAV2009_Customer.Customer_Fields.City;
filters[0].Criteria = "P*";
filters[1].Field = NAV2009_Customer.Customer_Fields.Name;
filters[1].Criteria = "P*";
customers = service.ReadMultiple(filters, "", 1000);0 -
Hello Kine,
Thank you very much.kine wrote:This is what work for me:NAV2009_Customer.Customer_Filter[] filters = {new NAV2009_Customer.Customer_Filter(),new NAV2009_Customer.Customer_Filter()};
filters[0].Field = NAV2009_Customer.Customer_Fields.City;
filters[0].Criteria = "P*";
filters[1].Field = NAV2009_Customer.Customer_Fields.Name;
filters[1].Criteria = "P*";
customers = service.ReadMultiple(filters, "", 1000);
Really a nice help. =D> =D> =D> =D>
Thanks for your instant and kind support.
I really appreciate.
Thanks again.0 -
-
Can we filter the records by using the field having Integer datatype?
If yes then How?
I tried for it,KeyList_Filter KLF = new KeyList_Filter(); KLF.Field = KeyList_Fields.TableNo; KLF.Criteria = "36"; GridView1.DataSource = KLS.ReadMultiple(new KeyList_Filter[] { KLF }, null, 100);
Here, TableNo field is of Integer part. As a result it is not binding any data in Grid.
If I am using "<36" (Records having TableNo less than 36) or ">36" (Records having TableNo greater than 36) then filter works correctly.
So If I want all records having TableNo 36 then what to do?
Please, suggest.0 -
did you try
"=36"Freddy Kristiansen
Group Program Manager, Client
Microsoft Dynamics NAV
http://blogs.msdn.com/freddyk
The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.0 -
Hello Freddy,
Yes, I have already tried for that. But of no use.
Any suggestion?0 -
Hello All,
Following is my code.ApplicationApprovalEntries_ref.ApplicationApprovalEntries_Filter ApplicationApprovalEntries_Filter = new ApplicationApprovalEntries_ref.ApplicationApprovalEntries_Filter(); ApplicationApprovalEntries_Filter.Field = ApplicationApprovalEntries_ref.ApplicationApprovalEntries_Fields.Sequence_No; ApplicationApprovalEntries_Filter.Criteria = "*"; gvApplicationApprovalEntries.DataSource = navref.ApplicationApprovalEntries_serv.ReadMultiple(new ApplicationApprovalEntries_ref.ApplicationApprovalEntries_Filter[] { ApplicationApprovalEntries_Filter }, null, 0); gvApplicationApprovalEntries.DataBind();
As I discussed previously,
I am getting this error in above code
"You cannot enter '*' in Integer."
That means it's not allow to insert this codeApplicationApprovalEntries_Filter.Criteria = "*";....
So, please help me in above.0 -
-
What is the intension of this filter:
ApplicationApprovalEntries_ref.ApplicationApprovalEntries_Filter ApplicationApprovalEntries_Filter = new ApplicationApprovalEntries_ref.ApplicationApprovalEntries_Filter();
ApplicationApprovalEntries_Filter.Field = ApplicationApprovalEntries_ref.ApplicationApprovalEntries_Fields.Sequence_No;
ApplicationApprovalEntries_Filter.Criteria = "*";Freddy Kristiansen
Group Program Manager, Client
Microsoft Dynamics NAV
http://blogs.msdn.com/freddyk
The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.0 -
Intension is to display all the Records with any SEQUENCE NO value.
Here, SEQUENCE NO is the Integer type of field.0 -
Then remove the filter - no filter means take all.Freddy Kristiansen
Group Program Manager, Client
Microsoft Dynamics NAV
http://blogs.msdn.com/freddyk
The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.0 -
Hello Freddy,freddy.dk wrote:Then remove the filter - no filter means take all.
navref.ApplicationApprovalEntries_serv.ReadMultiple(null, null, 0);
instead ofnavref.ApplicationApprovalEntries_serv.ReadMultiple(new ApplicationApprovalEntries_ref.ApplicationApprovalEntries_Filter[] { ApplicationApprovalEntries_Filter }, null, 0);
It is working fine.
Thanks a lot.0 -
How to apply DateFilters through Filter Criteria in .NET part?
I have one field in Table "Date"
From web user will enter "Satrting Date" and "Ending Date".
I want to filter the "Date" field data in the Range of "Starting Date" and "Ending Date".
How to do that?0 -
Oh I tried for
StartingDate..EndingDate
and it wored for me.0 -
Hello All,
I am having problem with filtering of OPTION type field.
I have one field "Type" having options " ,Open, Closed"
Now, I want to filter data having "Type" value "".
I tried using,Posted_Filter.Field = Posted_ref.Posted_Fields.Type; Posted_Filter.Criteria = ""; gvPosted.DataSource = navref.Posted_serv.ReadMultiple(Posted_Filter, null, 0); gvPosted.DataBind();
IN NAV it is filtering the data. But, on web not.
What could be the solution?
or may be I am wrong.0 -
Try " ", space in between double quote.0
-
I also tried for the same.
But, not worked.0 -
Sorry, is "''", single quote within the double quote.
Actually it supposes working by apply in Type._blank_.ToString(), Type.Open.ToString(), and Type.Closed.ToString() for your case, but it seems doesn't works for _blank_. Anyway, "''" will do for now.0 -
Thanks for the reply.
I did try for it.
But got the Exception as,
"The filter ''' is invalid. An apostrophe (') is missing in the filter in the Payment Status field in the Purch. Inv. Header table."0 -
You missed out a single quote, more details,
"''", 2 single quotes ('') within 1 double quote ("").
=> Like this, " ' ' ", trim the space, get it?0 -
"''"0
-
Thanks a lot for reply.
I also tried for it.
Dint work.0 -
You're welcome.
It works for me, you could probably narrow down your problem, put something like below without binding it to GridView,Posted_Filter.Field = Posted_ref.Posted_Fields.Type; Posted_Filter.Criteria = "''"; //Declare a dynamic array Posted[] posted; posted = navref.Posted_serv.ReadMultiple(Posted_Filter, null, 0); //Make a break point here (F9)
Check your VS "Locals" to see if the records of "posted" are what you intended. Hope this helps.0
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