We have changed our pricing. Flexmonster Software License Agreement was also updated (list of changes)

How to use a hidden field in a formula

Answered
leandro f asked on January 22, 2025

Hello, my report has a column that is a formula, something like sum("value") - sum("discount"). I would like the "discount" field to not be visible to the user, both in the field selection and in the details modal when double-clicking on the value, but when I set visible: false in the mapping the formula stops working.

How can I get the expected result?

Thank you.

3 answers

Public
Maksym Diachenko Maksym Diachenko Flexmonster 7 days ago

Hello, Leandro!

Thank you for reaching out to us.

Please note that the described visible: false behavior is intended, as this setting excludes the field from Flexmonster's data structure. Thus, the field is not only hidden but also cannot be used in any way.

You can partially achieve the expected result by hiding the field from the Field List by hiding it via CSS (see JSFiddle example where the "Quantity" field is hidden):

.fm-fields-view li[aria-label="discount"] {
display: none;
}

As for the details view, kindly note that you cannot hide the measure composing the calculated value. By default, all measures composing a calculated value are shown. This design choice gives users a comprehensive understanding of the data contributing to the measure.

Please let us know if our answer helped you.

Best Regards,
Maksym

Public
leandro f 6 days ago

Hello, Maksym!

Thanks for your feedback.

In fact, our case is a little different from what I described. We are using a property like Boolean , where we pass the value 0 or 1 and depending on this value we perform one calculation or another. However, this column is displayed to the end user and it is causing confusion.

We need a way to apply this conditional, but without displaying the field in the details view. Would it make sense to create a feature so that we can reproduce this scenario, or do you know of any other way we could apply it?

Thanks.

Public
Maksym Diachenko Maksym Diachenko Flexmonster 3 days ago

Hello, Leandro!

Thank you for writing to us.

The feature that allows using a field in formulas while keeping it hidden from all other parts of the user interface makes sense for this use case. We have added this to our wishlist, and we will notify you if there are any updates on this matter.

Please let us know if you have any other questions.

Best Regards,
Maksym

Please login or Register to Submit Answer