I’m a Premium licensed user.
Is there a way to call ‘Add Calculated Value‘ dialog(in ArrangeField tool) at custom?
Thank you for writing to us.
We can add a new API call capable of opening this pop-up window at custom. It can be added on July the 1st. Would this work for you?
Please keep in mind, that by default, a Field List is opened as soon as a pop-up window for calculated values is closed. This allows confirming the current slice with the new values added. Does this behavior suit your needs or would you rather prefer a new value to be added to the grid automatically?
Waiting for your feedback.
Thank you for your response.
Avoid opening ‘Field List’ after ‘Calculated Value’ popup.
And actually, we are preferring a ‘new value to be added to the grid automatically’. Please make this as possible.
Thank you for your reply.
Your feedback is very important to us.
Our team will take your remarks into consideration while working on this feature.
You can expect the new API call to be available in the minor release with the ETA 1st of July as before.
Please let us know if you have further questions.
We are glad to inform you that a new
openCalculatedValueEditor() API call was added. It allows opening calculated value pop-up window editor.
This is available in the 2.7.9 version of Flexmonster: https://www.flexmonster.com/release-notes/
You are welcome to update the component: https://www.flexmonster.com/doc/updating-to-the-latest-version/
Please let us know if everything works fine for you.
We would like to provide some information about how the
openCalculatedValueEditor API call is used.
Below are more details about this new API call.
Both parameters are optional, calling
openCalculatedValueEditor() will open an empty editor.
uniqueName – String. The unique name of calculated value (for editing/deleting).
callbackHandler – Function|String. A function that is called after an action (clicking Apply/Delete button).
callbackHandler takes the
response object with the following properties:
uniqueName – String. The unique name of the calculated value.
isRemoved – Boolean. Specifies whether the calculated value was removed (true) or not (false).
For example, if you would like for the newly created calculated value to be added to the grid, simply specify the callback handler:
// 1. Get the current slice
let slice = pivot.getReport().slice;
// 2. Find and activate the newly created calculated value
(slice.measures).find(measure=>measure.uniqueName==response.uniqueName).active = true;
// 3. Run query with the modified slice for the changes to take place
Here is a JSFiddle example for illustration: https://jsfiddle.net/flexmonster/q2z3ejwp/
Please let us know if you have any further questions.