Get Free Trial

Extract Property

Scott Oliver asked on June 10, 2021

Similar to getting the record ID number, I would also like to extract information stored in a JSON field from a double click cell event. However, ideally the information I am retrieving isn’t available for selection in the fields list.
For example, if my JSON packet looks like: {‘id’: 1, ‘data_type’: ‘furniture’, ‘title’:’large red chair’, ‘category’:’chair’}
I would like all fields accessible to the user creating their reports (with the exception of ID and and data type). Once double clicking on a cell, I would like to retrieve those two pieces of information (in an alert for example).
Double clicking the example row above would return me an alert of 1 and furniture.
I would like this to work in both flat mode and classic (when in the drill through).

3 answers

Illia Yatsyshyn Illia Yatsyshyn Flexmonster June 10, 2021

Hello, Scott,
Thank you for reaching out to us.
We suggest checking out the property data type supported by Flexmonster. The property serves to set member properties. This field is not shown in the Field List. For example, it can be used to associate a productID with a product. Here is a JSFiddle based on your example: Try double-clicking the cell to retrieve both field’s id and property.
The property can be obtained in classic, compact, and flat forms. Please note that it will not be available in the drill-through.
Please let us know if it works for you.
Looking forward to hearing your feedback.
Best regards,

Scott Oliver June 10, 2021

Hi Illia,
I’m having difficulty extracting the member, it appears to be returning back as null. I have attached an example of my report.


Illia Yatsyshyn Illia Yatsyshyn Flexmonster June 11, 2021

Thank you for your feedback.
Could you please provide us with details about specific cases when a member property appears to be null?
You can use the JSFiddle we prepared for the demonstration: It is based on the report you provided with your recent question.
Please note that the unavailability of the member property is expected when the clicked cell cannot be associated with any specific member of the hierarchy.
Looking forward to hearing from you.
Kind regards,

Please login or Register to Submit Answer