DefaultSet is being cached

I think that DefaultSet is cached. When I use the same DataStructure with two different DefaultSets that are used on two different screens in menu then when I open screen A with default value of column A set to X everything works just fine. But when I open second screen B with default value of column A set to Y (column is obviously the same, lets say refAId) then instead of new value Y there is value X being saved.

It is being cashed. The only solution is to logout and open first the screen I want to work with.

My version is 2021.1.0.2451. I checked it also on 2022.1.x and the bahaviour was the same.

That is quite strange, a default set is a part of the cache key so it should work.

It would be great to have a test case for this in our end to end testing model. @washi would it be a good idea if @gmcr.cz would add an example for it? And if so, could you maybe document the way how to do so?

I don’t know. As for the test documentation I think @jsusen is better candidate to write it.

Thank you for your answers. I tested futher more and found out that when I have template assigned to screen in menu and also use defaultset at the same time, the defaultset value is not applied and instead the field get default value from entity/datascructure which is wrong.

E.g. I have template to generate some values using lookups etc. But I do not generate field refSomeStateId. When I clik Add button on screen, I would like Default set to fill in refSomeStateId default value according to from what form I add the record. A from screen A, B from screen B. When using template and default set asside this does not happen.

Just to confirm: You use a template-set and a default-set at the same time and the default-set is then ignored?

Yes. Exactly like you say.