Currently it is not possible to save the object set filters to an object. i.e. object set filter is not assessible by for example Functions to write an ontology edit function to writeback to an object.
Workflow is as follows:
We generate a list of objects that could be interesting to our users
The object information is displayed in workshop
We want our user to use the filtering functionality in workshop (either filter pills or the filter in the table) to select down the objects they want.
The filters should be saved so that going forward when there are new objects that come in, they are captured for the users. The filters will be shared across different users.
Technically it means that there needs to be a way for user to save the filters and writeback to ontology, so that we can use it again in the object, and also downstream in the pyspark layer again from materialization
Hey, I might be missing the mark, but it sounds what what you might want is filter variable value extraction. You can already save a filter as a variable, but now you can specify that when the filterâs value changes, it should writeback to the variables defined in its default. By doing this you can keep track of values that you are filtering on in other variable, and then use those how you would like (pass along to a function or action, use as interface variable, etc.).
Let me know if I am misunderstanding your use case here.
My exact use case is a bit more complex than that where the value extraction approach might not fully work. Let me explain:
we have an object where user defines a filter and we want to save it (for this your proposed value extraction approach would work)
but then we want to package the Workshop app into MarketPlace via DevOps so that we can deploy to multiple clients (each having the same object type but with slightly different property schemas - some have more columns than the others)
Using the value extraction approach requires me to hardcode every single property in the Object Set Filters widget, but that wouldnât work if you want to deploy the app to an object with dynamic schema
so what is actually helpful is a way to stringify your JSON for the object set filter itself, and then writeback to another object. WHen we query this again next time, we can always parse the JSON and pass the object set filters back to the widgetâŚ
Hi @hfcheung we had the exact same requirement. we wanted to let users freeze their filters as a property of a âreview objectâ to save the exact state of âwhat they were looking atâ for other users. we managed to get it working - Iâd say by shooting through the knee into the heart (or should I better say slate ;-)). Iâll look for the details tomorrow but so far the concept.
you need to go via an embedded slate module. you pass in the object set you want to stringify the filter
within slate you actually have a âstringify filterâ function (that is not the name)
then you pass back the stringified filter and just safe this as a property of your object type
the same way works the other way around. You can read such stringified filter to create in slate object set again.
If I remember correctly there where some challenges with calling the âsaveâ event through a button click from the parent workshop module. But I can get the details from my developer how we solved that.
P.s. to anybody using this forum on a phone: is the text input box for you also nearly unreadable thin (literally 1.5 visible lines)?
Iâm curious to understand your step 2 more. When you pass a filtered object set into Slate, how do you stringify the filters from the object set within Slate?