Jump to content

Convert a a condition written with a tool to formula (so it can be improved)


Recommended Posts

Hello,

i defined some conditions, using identify->value search, etc, which is very convenient and easy to get started

but i'd like to update this definition or add other criteria. this could be easily done using formula.

i see we can duplicate to formula, is it also possible to convert to formula?

 

thank you

 

Link to comment
Share on other sites

Hi Margarida, 

The only way to convert it in Workbench is by duplicating it to a formula. After that, update all calculations with this variable by substituting the old condition created with Workbench's tool with the new duplicate. 

Regards, 
Kin How

Link to comment
Share on other sites

  • Seeq Team

To add what Kin How mentioned above, I would encourage you to submit a feature request for this capability as I could see this being very helpful when iterating analyses over time. 

To do so, go to support.seeq.com, click on "Support Portal" in the lower right, and submit an "Analytics Help" request referencing this post.  A one-liner will be sufficient.  We will make sure it gets linked to a developer feature request.

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

Hi Margarida,

as a workaround you can use the REST API to convert an element to a formula. Each item has a property called "UIConfig" that stores the information which user interface should be used when editing the element. You can use the endpoint /items/{id}/properties/{propertyName} to update (POST) or remove (DELETE) it. However you should be careful using the API, as you may break things.
image.thumb.png.0e57accc8fccad13e11cc657790b6c2a.png

Both removing and updating the property had the effect that Seeq is opening the formula editor instead of the UI tool.

image.thumb.png.c42829d787ac1b93327cd966b8904f92.png

 

image.thumb.png.fb12dc42404df0a364afe338587fd1cb.png

 

image.thumb.png.af69f367e18635be46475320fa310b06.png

Regards,

Thorsten

Link to comment
Share on other sites

Hello Thorsten,

thanks for your suggestion. i was going to try it but could not really find it, the "You can use the endpoint /items/{id}/properties/{propertyName} to update (POST) or remove (DELETE) it", i mean i can't see your second screenshot. not sure anything to do with my version (R60.1.2)?

 

thanks

Link to comment
Share on other sites

Hello Margarida,

you can access the API Reference by clicking the hamburger button at the top right corner of Seeq:

image.png.84dea9455c755fe5c9e7a7b9fe12d3f5.png

In the API reference you will find an entry called "Items" which has the appropriate methods available.

Regards,

Thorsten

 

 

Link to comment
Share on other sites

Good morning Thorsten, 

i do see a different screen (i see"property information" instead of "body".

I was testing with a different condition, with the respective ID and i thought i would need to use the original text in the UIConfig field and update it? highlighted is the text in my UIConfig? or how exactly should i proceed?

image.thumb.png.ca7c63614bde5516fcd5c00d8cef958c.png

 

Link to comment
Share on other sites

Hi Margarida,

you can use the following settings in the request body:

{
  "unitOfMeasure": "string",
  "value": "{\"type\":\"formula\",\"advancedParametersCollapsed\":true,\"helpShown\":false}"
}

image.thumb.png.ca79557b3e22b8a037f95b9ce0c3b117.png

If you want to switch back to the UI tool you should save your previous value somewhere, so you could reuse this in the POST request. 

Regards,

Thorsten

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...