Custom Data Source - DELETE issue with the API updateData

Answered
Sengupta asked on August 10, 2021

Hi there
We have noticed a problem with flexmonster.updateData 
The API is unable to handle the situation when data is removed from the collection.
We have tested this against various versions of Flex Monster and seems the bug was introduce from 2.9.1 onwards.

2.8.31 - No Bug
2.9.0 - No Bug
2.9.1 - Bug appeared
2.9.4 - Bug still there
2.9.5 - Bug still there
Please see the attached document (screenshot taken against the latest version 2.9.5).

Attachments:
FM NEXUS-15567.docx

10 answers

Public
Sengupta August 10, 2021

Please note, if I click to expand on the supposed to be deleted row, the line disappears
Hence I guess that internally the data is deleted but the GUI haven't reflected the removal

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster August 11, 2021

Hello,
 
Thank you for reaching out to us.
 
If we understand correctly, in the provided example, the "CASH" member is deleted from the dataset on the server side. Next, you fetch the updated data using the updatedData API call.
 
If so, we want to explain that we did not manage to reproduce this behavior using the latest version of Flexmonster 2.9.5. We used Flexmonster Data Server as a data provider during our research.
If a custom implementation of the custom data source API is used instead of the Data Server in your case, we recommend making sure the deleted member is not passed to Flexmonster. More specifically, check how the /members request is composed on your backend.
 
Please let us know if it helps.
 
Regards,
Illia

Public
Sengupta August 13, 2021

@Illia Yatsyshyn
I have replicated the issue. Please refer to 
https://jsfiddle.net/Sengupta/96Lrmft5/51/
 
If you click on the button "UPDATE (No Parameter)", it works all Ok,
If you click on the button "UPDATE (With Parameter)", then you will see the issue.
Ideally follow the below steps and it will highlight the issue clearly:
Step 1: Click on "UPDATE (No Parameter)"
CASH row will be added & values in ULILITY line changes
 
Step 2: Click on "UPDATE (With Parameter)"
CASH row will go BLANK & values in ULILITY line changes
 
Step 3: Click on "UPDATE (With Parameter)"
CASH row will be repopulated & values in ULILITY line changes
Regards
Anirban
 
P.S. This bug may have got in when fixing another issue
https://www.flexmonster.com/question/custom-data-source/
 

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster August 16, 2021

Hello, Anirban,
 
Thank you for preparing the example. It did manage to bring some light on the nature of the problem.
It seems the issue is caused by the keepMembersOrder property you mentioned.
 
We will research possible solutions for this problem and get back to you ETA Sept 7.
 
Do not hesitate to contact us if other questions arise.
 
Kind regards,
Illia

Public
Sengupta September 6, 2021

@Illia Yatsyshyn
I can see that Flex Monster released 2.9.7 (build 09/06/2021 12:50:47) but our issue isn't fixed

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster September 7, 2021

Hello,
 
We are reaching out to share the results of our recent research.
 
The keepMembersOrder property should only be used when no members are changed. It is only compatible with a static enumeration of members. If new members are going to be added/existing ones removed after the update, set the keepMembersOrder property to false.
Otherwise, tuples would need to be restructured that leads to default sorting (members order is not preserved).
 
This is due to the specifics of the custom data source API protocol. We did not manage to find an acceptable solution to both preserve members' order and change members' enumeration.
 
Feel free to reach out if other questions arise.
 
Kind regards,
Illia

Public
Sengupta September 7, 2021

@Illia Yatsyshyn
keepMembersOrder to false causes existing sorting to reapply
see the issue I raised before https://www.flexmonster.com/question/custom-data-source/
 
Our application is a trading platform.
Resorting is a major issue for us.
Our reports contains 1000s of lines.
The values changes and reports are updated periodically including new lines added/subtracted.
If a sorting takes place then it's really a hard job to manually relocate the lines that the users were monitoring.
Please note that updates frequently happens through out the day.  

Public
Vera Didenko Vera Didenko Flexmonster September 9, 2021

Hello,
 
Thank you for your reply.

Our team is currently working on possible solutions.
While our team is investigating the issue further, we would like to clarify a few points regarding your use case:
 
1) Do you use the compact/classic layout?
2) Do you use expands in your reports?
3) Do you use drills (multi-level hierarchies)?
4) How many fields are in rows, how many are in columns?
5) Do you call updateData() before expanding/drilling the data or after?

More insight into your use case will help us find the best solution. 
Thank you, and looking forward to your response.
 
Kind regards,
Vera

Public
Sengupta September 9, 2021

@Vera Didenko,
As of date we have 1892 reports
1) Do you use the compact/classic layout?
93 reports are in classic mode by default. rest are all in compact mode by default.
Our app allows users to switch and save the default mode.
2) Do you use expands in your reports?
Yes we do expand
3) Do you use drills (multi-level hierarchies)?
No drills
4) How many fields are in rows, how many are in columns?
Within all 1892, the max usages are:
rows - 6 
columns - 2
measures - active - 19 (but active & inactive - 172)
page - 1
5) Do you call updateData() before expanding/drilling the data or after?
Both - after and before expanding
Regards
Anirban
 
P.S. The only options under "slice" we don't use are "drills" & "drillThrough".
All other options are in use.

Public
Vera Didenko Vera Didenko Flexmonster September 10, 2021

Hello,
 
Thank you for providing further details.

Our team is looking into your case. We will share the results with you shortly.

In the meantime, feel free to reach out should questions arise.
 
Kind regards,
Vera

Please login or Register to Submit Answer