0

Our Dashboard have dropdown which consist of more than 8k products and we have such 4-5 dropdowns. I want to filter data based on this dropdowns.

But if I selecting all products then restful api url is breaking.

Can i use azure bus service or similar message broker service to pass this complex and multiple parameters via service and which then consumed by all apis??

  • 6
    Are you saying that you have 8000 items in a drop down? If so, I think your biggest problem is not that API... Have you considered how users are going to find anything in that list? I'd find another way to access that data, if I were you. – Quido Aug 11 '21 at 11:23
  • Consider using the `` component... I have tested it against 100k records it is great. – Brian Parker Aug 11 '21 at 12:29

1 Answers1

0

While I do understand what your need is I will suggest to re-think your approach as that will lead to a better user experience.

I will use a first drop down, completely empty, that will fill in options while the user types in whatever product list you have, that way, there is only a group of items that are filled in that the user is interested in.

I will also suggest not to load anything on that drop down until the user has entered, let's say, 5 characters.

After that let the user select an item from the dropdown, and filter the second drop down and continue to use the same technique with all drop downs you have.

Let me know if you have any questions around this approach and I will be more than happy to provide an example if you don't know how to do it.

Edit:

Including samples for load dropdown lists dynamically and also another post with an example on how to return some JSON from an Azure Function that can return the data in a dynamic way like you need.

From what I can see I think it'll be helpful for you to go through several different examples that can bring you progressive knowledge to what you need to achieve, first of all it'll be nice if you know how to load items dynamically on a dropdown list:

That is a nice example, you can have an entry where the user can type whatever products you have and then they type, lets say, more than 5 characters go and search for that data.

https://www.codebyamir.com/blog/populate-a-select-dropdown-list-with-json

This other example shows you how to return data from an azure function with the data that you need to show the users. This is not exactly what you need as you need to receive a parameter with what the user typed and search in your database for the items that match that search and return that data in a JSON format so you can use it on your web page to show the dropdown list. I will suggest to initially hard code a few items and return those to check that the functionality is there and once you have that up and running move to get the actual data from the database.

How to return a JSON object from an Azure Function with Node.js

ProgrammerV5
  • 1,915
  • 2
  • 12
  • 22