Submitting of an Action causes reload of all Filters

Not sure if this should be Bug Report or Feature Request.

But sometimes in Workshop - when submitting an Action that creates a new Object. All the Workshop Variables reload.

E.g if a user just filtered on something. The filter is removed. He needs to manually re-filter.

Is there something specific in the Action that causes this behavior?

1 Like

Hi Emmanuel,

Thanks for you post, a little more context would be very useful here.

What widget are you using to filter and how is it setup? What action is being submitted? Does the refresh happen every time the action is submitted?

Any other context would be super useful to figure this one out.

Thanks in advance

Hi! @azeemaf thank you.

Easy example:

  1. There’s a table of Object Type 1 - The user selects one of these Objects.

On a click of a button I set it as “active_object“ → via “set variable value“

  1. I submit an Action that creates a new Object of Object Type 2.

=> The “active_object“ variable turns into “undefined“. Selection is gone.

My workaround in the past:

In the Submit Action:

  • Before action submit event:
  • I set variable value “active_object“ → to “active_object_copy“ (materialize)
  • If I notice active_object is undefined a pop up opens.
  • This button shows a button: that allowes the user to set variable value: “active_object_copy“ to active_object“
  • (Does not always happen so this pop up only opens if workshop automatically set the variable to null)

Key Takeway is:

I observe this behavior from time to time in different applications. It’s not always happening. If you want I try to build I simple demo showing this.

1 Like

A demo to see this behavior would be very useful, I have tried to reproduce this issue on our stacks but must have set it up differently.

Generally when the ontology updates in a workshop some variables are bound to update, however this exact behavior you have described feels different, further investigation needed i think

1 Like

I observe @emmanuel1’s behavior as well. If I recall correctly it appears when you pre-configured a filter variable with specified input variables (to set the filter variable “variable backed”) AND with update behavior set to automatically

When an object set (using this filter variable) receives an ontology edit, it causes the filter variable to reset. I never questioned this behavior and was able to switch it off by changing the update behavior of the filter variable to “on module load and event”. However this comes with some other side effects. So understanding what the expected behavior should be would be nice :slight_smile:

I will be able to provide more details tomorrow. But maybe this already helps to troubleshoot @azeemaf

1 Like

Hi! Great question! If you switch the Filter output variable (see bottom of screenshots here - “Output data” section) in any filter lists to be recomputed “On module load” or “On module load, and when triggered by an event” the filters should not reset.

@ckucera thank you for your response. Could you go a bit more in detail into the expected behaviour/limitations when using automatic update behaviour?

Again, I remember, the filter variable only resets any user made filter selections if the filter variable is configured being variable-backed (Here: Filter extraction) - can you confirm this is the expected behaviour?

Details on the behavior of automatic vs only when triggered by event can be found here. In short, automatic updates mean that a variable will be recomputed whenever any of its values could have potentially changed. An action submission (even for an unrelated object) is considered one of these events, and will recompute the variable value.

Re-computation only happens automatically for variable-backed filters because they are the only ones which have a default “Recompute variable value” of automatic assigned to them (this value is at the very bottom of the filter list section, below the “Default Filter” section). Changing the “Recompute variable value” behavior will only change the behavior of the filter list itself, any variables backing the filter will continue to inherit from the filter list.

1 Like