Despite the COVID-19 outbreak, our team continues operating at full speed. We are always here to support and answer all your questions.

Feel free to reach out by filling this quick form.

Fill the form
Get Free Trial

Something wrong with level and date field when calling runQuery

Answered
Courtney Chow asked on December 16, 2019

Question 1: When using the “runQuery” and “getAllMeasures” and related APIs to implement our own FieldsList, fields with level seems very tricky. Sub-level fields share the uniqueName with the top-level field, but after we add the sub-level field to “column” or “row”, the pivot always show the top-level field. However, the built-in FieldList does not have this problem.
 
Question 2: This one is about the date string field. After adding one to the “column” or “row” and click the filter icon, the label filter or date filter are sometimes set “display: none” (by js probably, because it’s inline style). After sync the report data with the old version (with built-in) FieldList, it works correctly.
Are there some inner workings that are not covered by the public APIs related to date and level field type?

1 answer

Public
Vera Didenko Flexmonster December 17, 2019

Hello, Courtney,
 
Thank you for writing to us. 
 
We would like to confirm that the Field List’s functionality can be achieved with the available API calls.
 

  1. About showing a field starting from mid-level:
    We would like to explain that each level has its own uniqueName.
    The levels of a field can be accessed with the getAllHierarchies() API call.

    To display a field starting from a certain level, the level name needs to be specified for that field in the slice object that is passed to runQuery(), for example:

    slice: {
    rows: [
    {
    uniqueName: "Category",
    levelName: "Product Name"
    }
    ]
    ...
    }

    Also, it is possible to check how different representations are achieved by applying the desired settings through Flexmonster’s UI (for example, the Field List), saving the report and seeing how the configurations are applied.
    Please let us know if this helps.

  2. About the date string field:
    Could you please provide a JSFiddle example for illustration? 
    This will greatly help us to understand the situation better and to find the best solution for your case.

 
Looking forward to your reply.
 
Best regards,
Vera

Please login or Register to Submit Answer