Filters of dataset not working any more

Below is code which is filtering my dataset to have appropriate info after selecting details in a dropdown menu.

Selecting Date of Event should automatically select the corresponding Place of Event. Selecting Last Name should automatically select the corresponding First Name(s).
I was working perfectly well till yesterday.

Now, it does not filter any more and gives me following line in the console.


I have another page with the same sort of code / filtering of datasets and it also does not work any more. To the best of my knowledge, I did not change the code nor did I change anything in the datasets (especially key fields and field types).

Can you please assist in resolving this issue?

Thanks,

Hi,
The getItems function you are using is expecting two parameters, “fromIndex” and “numberOfItems”.
According to the error you are getting, that’s where the problem is.
You can look at the documentation for this function and examples here:

Dear Tomer,

Thank you for your reply. I understand. Nevertheless, such code has been working perfectly well for several weeks until few days. Suddenly, with no change, it does not work… I then assume it does not come from this ‘getItems’ function.
Can it be something different? Can I not tweak this issue and keep the same sort of coding as it perfectly fits my needs?
Thanks again

What lead to your issue is that we now enforce passing parameters to getItems, in accordance with the documentation. We will soon post a product update about this.
Does your code work after fixing the call to getItems or do you still have issues? Let me know and I’ll do my best to help.

Hi Tomer,
I see. I could guess somethig of this kind …
Actually, not being very familiar with coding, I yet did not try to figure out how to adjust the parameters. The objective is to sort a 2nd dropdown based on the selection of the 1st dropdown (so that only very few choice is left to the user on the second dropdown).
It sort of acts as a filter to the dataset. But I also have a table on the same page which is linked to the same dataset. With the getItems function, this table is left unchanged. With a setFilter function (which I now have since getItems was returning a bug), the table also is filtered (which I do not want).
You can see dropdowns and table + code in original message.

Thanks for your help

What you can do is just add another dataset configured to use the same collection, and connect the table to that new dataset. That way you don’t need custom code. Will that work for you?

It will. Not very elegant though.
Are you / will you be forcing parameters on other functions? In particular, whatabout the filter() one?

It’s up to you, you can of course use code if it fits you better. You can see an example on how to use the function here:

Since we are still in beta, we can change the API if needed, but we will always announce it.
Note that for getItems the API was not changed, just enforced.