Hi there
Is there a way to force execute a "fields" type API?
https://jsfiddle.net/Sengupta/c2Lrn15d/21/
When Flexmonster loads, it calls "handshake", "fields", "members", "select" end-points
14:26:04
{"type":"handshake","version":"2.9.5","requestHeaders":{}}
14:26:04
{"index":"fm-product-sales","type":"fields","requestHeaders":{}}
14:26:04
{"index":"fm-product-sales","type":"members","field":{"uniqueName":"Color"},"page":0,"requestHeaders":{}}
14:26:04
{"type":"select","index":"fm-product-sales","query":{"aggs":{"by":{"rows":[{"uniqueName":"Color"}]},"values":[{"func":"sum","field":{"uniqueName":"Price"}}]}},"page":0,"requestHeaders":{}}
On flexmonster.updateData, it only call "members", "select"
14:30:06
{"index":"fm-product-sales","type":"members","field":{"uniqueName":"Color"},"page":0,"requestHeaders":{}}
14:30:07
{"type":"select","index":"fm-product-sales","query":{"aggs":{"by":{"rows":[{"uniqueName":"Color"}]},"values":[{"func":"sum","field":{"uniqueName":"Price"}}]}},"page":0,"requestHeaders":{}}
We need this as in our system more "fields" are added from other sources on runtime
Please note I even tried to force the call to "fields" end-point by changing the "index” value.
On these occasion, the Flex Monster API do call all “handshake”, “fields”, “members”, “select” end-points.
But this cause the table presentation either go blank or in a grey scale
Hello,
Thank you for writing to us and for sharing an example.
For such cases, we would recommend the following approach:
/fields
.
Here is a modified version of the JSFiddle showing this approach: https://jsfiddle.net/flexmonster/w3u7fzed/.
Please let us know if this works.
Kind regards,
Vera
@Vera
Reloading the reports has a negative performance hit.
How can we update the "Fields" only?
Regards
Anirban
Hello, Anirban,
Thank you for your response.
Due to the current architecture, the fields define the data structure.
If new members
are added to fields, you can use the updateData()
API call to refresh the data in Flexmonster.
However, if more fields
are added to the data set, Flexmonster needs to reload the structure, including the current report.
With this in mind, the /fields
request can't be initiated on its own. If you need to add new fields for the custom data source API, the best approach is to reload the report.
Feel free to contact us if other questions arise.
Kind regards,
Vera