EditOntology Function trigger using Slate widget from Workshop App

Hi Folks,

I have been working on use-case where I had to use slider widget. Now since workshop didn’t have slider, I have embedded slider widget from slate into workshop and it’s working fine. However, now based on the change in slider value, we want to trigger the ontology edit function which will update the values based on the objectset & slidervalue.

Could you please help me with the above implementation ? thanks in advance

1 Like

Hi,

Instead of triggering the ontology edit from Workshop, you can also consider editing within Slate. Here is the documentation page: https://www.palantir.com/docs/foundry/slate/applications-writeback/

You can e.g., pass the relevant object set to be used for edit from workshop to slate, and within slate you can then use the different types of events to customize how the change in slider value can impact the ontology edit.

Hope this helps!

3 Likes

thanks @Jamie totally agree with your point, but then any change in the slider will have to be passed to slate along with the objectset. Can you outline the step, I went through the documentation but couldn’t figure out ?

If I understand you correctly, the slider is already part of Slate, and you are embedding the Slate into your Workshop module via the iframe widget? In that case, you would not need to pass the slider to Slate.

Can you describe with more details (not necessarily what you are doing exactly if you don’t feel comfortable sharing, can be a similar example) what you already have in place, and what you are trying to achieve? I am afraid it would be hard for me to outline the steps without further details.

Sure, Actually we have created a Slide widget in Slate which I have embedded in the Workshop. We are passing even the min, max range of slider through input parameter to the slate widget which is working fine.
However, when we change the slider value in the workshop, we have to manually trigger a calculation based on the value change through a button widget.
Desired Working:

  1. On slider change, it should trigger the function to calculate the value & takes slider value as parameter.

One question I still have is (or maybe I misunderstood something): wouldn’t it create too many edits, if every change in the slider value is submitted to ontology edit? Meaning, if the user intends to slide from 10 to 20, he/she could accidentally stop at 18, which is also picked up and used for creating an unnecessary ontology edit.

Other than being able to write to Ontology (documentation shared in my first reply), Slate can also run a function that uses the current value of the slider widget:

  • Functions defined within Slate for lightweight data-processing tasks: https://palantir.com/docs/foundry/slate/concepts-functions/.
  • Published foundry functions (where you might e.g., filter for and aggregate certain objects depending on the parameters): https://palantir.com/docs/foundry/slate/concepts-foundry-functions/

(Somehow I am not allowed to include links in my reply, so they are not clickable here)

2 Likes