I have noticed that when you have a filter with saved values and more than one parameter if you change the operator on one parameter the saved values in the other parameter get cleared out requiring the user to reset the saved values.
This doesn’t seem to happen with all parameters and operators but have noticed it mostly when changing to the ‘=’ or “in” operator.
This is not a huge issue but thought I would bring it to your attention if it hasn’t been already.
Unfortunately, we are unable to reproduce the problem. So could you please answer a couple of questions:
Which version of Platform do you use?
What types have the parameters with which the issue occurs?
The saved values are cleared right on the screen or are they empty after the filter was saved and reopened?
Could you share the filter XML? You can find it in Admininstratoin -> Entity Inspector. Select “entity type=Filter”
Thank you for the sample project.
I have noticed that your “Town” condition depends on the value in the “District” field. So it seems, it is OK to clear Town together with the District.
Moreover, if to change the operator to “IN” and set the list of districts the following error occurs.
It seems Platform works correctly.
But working with your sample project I have found the issue: The parameter field is not changed to list, when changing the filter operator to 'in' if the filter was edited · Issue #2771 · cuba-platform/cuba · GitHub Probably, due to this issue the “Town” field is not cleared anytime you change the operator.
I thought about the fact that the two parameters were linked but you will find another filter on Work Order called Work By Location Unlinked in that sample project where I have removed this link and the clearing behavior still occurs. So the fact that the parameters are getting cleared is unrelated to the linking of the parameters. In the case where the link exists it can make sense to clear them but in the case where the link is not there the town should not get cleared.
You are right. I have reproduced the problem and created the issue: Saved Parameter Values Cleared Out When Changing Operator · Issue #2773 · cuba-platform/cuba · GitHub
It does not occur in platform 7.2. You can upgrade the project if needed.