Get Free Trial

Calculated Values can be dragged in Fields popup

Answered
Tanushree asked on February 15, 2021

Hello team,
We are displaying all the formulas under Calculated Values in Fields popup.
In contrast to other attributes we want to prevent dragging of the Calculated values to other sections in Fields popup.
Is this possible in new FM?
Attached screenshot for reference:

  1. Showing initial Calculated Values
  2. Showing Calculated values after dragging to other “Report Filters” section

Thanks,
Tanushree

21 answers

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster February 16, 2021

Tanushree,
 
Please find our response in the parallel thread: https://www.flexmonster.com/question/restrict-selection-in-field-editor/.
 
Mykhailo

Public
Tanushree February 17, 2021

Hi Mykhailo,
In old Flex Monster 2.1 version, Calculated Values could be moved to Values section only.
Attached screenshot for reference.
Highlighted value shows that it was only successfully dragged to Values section inside Fields popup.
However, in new FM 2.8 Calculated values can be dragged to any section inside Fields popup.
Attached screenshot for reference.
Can this be made similar to old FM behavior?
Thanks,
Tanushree

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster February 19, 2021

Hi Tanushree,
 
We do have a request for this functionality (disable adding measures to rows/columns/filters) in our backlog already.
 
Our team will take a look at this when the roadmap allows – for now, however, we cannot provide you with a precise ETA for this.
 
Best regards,
Mykhailo

Public
Tanushree February 19, 2021

Thanks Mykhailo for your response.

Basically, we are using CDS datasource API and it does not support Calculate Individual Values.

This is why we are bringing the formulas in a field/measure called Calc Values. (We are not adding formulas through Add Calculated Value inside Fields)

When we select/tick the formulas from Calc Values then by default that formula is added to the Values section in Fields popup.

But the problem is these formulas can be dragged to any section (the formula can also be dragged from Values section to Rows/Columns/Filters).

So we really need to disable drag functionality for certain fields/measures (like in the case of formulas under Calc Values) and allow it to be dragged to only Values section.

This has become very crucial for us and any advice on this will be highly appreciated.

Thanks,
Tanushree

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster February 23, 2021

Tanushree,
 
Our team will take some time to research the possible solutions for such use cases – we will return to you with our findings on ETA Mar 22nd.
 
We’ll keep you posted.
 
Regards,
Mykhailo

Public
Tanushree March 23, 2021

Hi Mykhailo,
Any updates on this use case?
The last ETA mentioned was 22nd March.
Thanks,
Tanushree

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster March 23, 2021

Hi Tanushree,
 
Hope you’re doing well.
 
We’re glad to inform you that the issue with allowing to drop measures to filters/rows/columns for strictDataTypes: true was fixed. The issue with folder mapping property for strictDataTypes: true was solved as well.
 
This is included in the 2.8.29 version of Flexmonster: https://www.flexmonster.com/release-notes/.
 
You are welcome to update the component. Here is our updating to the latest version tutorial for guidance: https://www.flexmonster.com/doc/updating-to-the-latest-version/.
 
Best regards,
Mykhailo

Public
Tanushree March 23, 2021

Thanks Mykhailo for responding.
Could you please share an example or steps for restricting some members/fields to be dragged to row/Report filters/columns but should be draggable to Values?
Thanks,
Tanushree

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster March 24, 2021

Tanushree,
 
Please refer to the following JSFiddle sample: https://jsfiddle.net/flexmonster/b9xy0j5u/. Here, the strictDataTypes: true option is configured, meaning that you can only use numeric fields as measures. Other fields can only be used in rows/columns/report filters.
 
We hope this helps.
 
Kind regards,
Mykhailo

Public
Tanushree March 24, 2021

Thanks for your response.
I did try adding
options: {
strictDataTypes: true
}
but it seems to be not working.
Please find this fiddle for reference: https://jsfiddle.net/5b2k1vL4/
If you un-check ‘Price’ in Fields popup and then try to drag it to Row/Column/Filters, it is successfully dragged although it a ‘number’ type.
Similarly ‘string’ type attributes can be dragged to Values section successfully.
Kindly correct me if I’m doing something wrong here.
Thanks,
Tanushree

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster March 25, 2021

Tanushree,
 
In the sample you’ve provided, the Options object is placed outside of the Report object, which is why you see no changes. Once you put options inside the report, everything works as expected.
 
Also, remember you have to mark the measure fields with the isMeasure: true property, as shown in this sample: https://jsfiddle.net/flexmonster/b9xy0j5u/.
 
Regards,
Mykhailo

Public
Tanushree March 25, 2021

Sorry, I did analyse that I had placed options outside report but after correcting that there was no data showing up in FM report and all attributes in Field popup were treated as of type ‘string’.
Also I’m not sure where we have to place ‘isMeasure: true’ ?
Could you show me in this fiddle where isMeasure attribute should be placed for ‘Price’ :
https://jsfiddle.net/fqo7zw40/
 
Thanks,
Tanushree
 

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster March 26, 2021

Hi Tanushree,
 
The fields are treated as strings by default when the strictDataTypes option is enabled – the isMeasure property is used to specify which fields you want to be treated as numeric.
 
The isMeasure can currently be added through the meta-object of your JSON data, as shown in the previously mentioned example. We are also planning to add this property to the Mapping Object with our upcoming release on ETA Apr 19th.
 
Regards,
Mykhailo

Public
Tanushree March 26, 2021

Thanks Mykhailo,
In our scenario we are bringing Formulas from outside and displaying under a Measure field.
These formulas can be both string or number.
Is there a way ‘IsMeasure’ can be applied to string and it will prevent it from dragging to Row/Col/Filters?
Thanks,
Tanushree

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster March 29, 2021

Tanushree,
 
The isMeasure property is only applicable to numeric fields and does not work with string hierarchies. 
 
Please let us know if you have any other questions we can help you with.
 
Regards,
Mykhailo

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster April 20, 2021

Hi Tanushree,
 
Hope you’re having a great day!
 
Just checking in to let you know that we’ve improved the isMeasure property: it now works correctly both when configured in the Mapping object and in the JSON dataset’s meta-object – setting it to true for non-numeric fields no longer causes console exceptions.
 
This is available in the 2.8.31 version of Flexmonster: https://www.flexmonster.com/release-notes/.
 
You are welcome to update the component. Here is our updating to the latest version guide for assistance: https://www.flexmonster.com/doc/updating-to-the-latest-version/.

Best regards,
Mykhailo

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster April 27, 2021

Hi Tanushree,
 
How are you?
 
Just checking in if you’ve had a chance to test out the latest update. Is everything working well for you?
 
We would be happy to hear your feedback.
 
Best regards,
Mykhailo

Public
Tanushree April 28, 2021

Hi Mykhailo,
Thanks for coming back.
Are you suggesting that in the new version isMeasure attribute can be applied for both numeric and string fields?
Thanks,
Tanushree

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster April 29, 2021

Tanushree,
 
Thank you for your response.
 
No, the isMeasure property is still only applicable to numeric fields – we’ve just improved it a little to ensure everything is working as expected since before the update there was a possibility to encounter console exceptions in particular situations.
 
We hope this helps.
 
Regards,
Mykhailo

Public
Tanushree May 4, 2021

Mykhailo,
Unfortunately, we have some Formulas which can be either string or number.
Since we cannot apply isMeasure property to string type Measures, we can’t go ahead with this solution.
Thanks,
Tanushree

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster May 6, 2021

Tanushree,
 
Given the current architecture and technical specificities of the component, it doesn’t seem we will be able to implement isMeasure for string fields in the nearest future.
 
Nevertheless, we’ve added your request to our customer’s wishlist and will get back to you if anything changes on this matter.
 
In the meantime, if your main requirement is to prevent dragging specific fields to rows or columns, you might also consider implementing a custom Field List where such behavior would be possible.
 
Hope this helps!
 
Regards,
Mykhailo

Please login or Register to Submit Answer