Forum Discussion

kenwang's avatar
kenwang
New Member
5 years ago
Solved

persistProperties and stored data persistency

Hi, I have read through some of the past questions on persistProperties. I managed to get it working to some extend but I am facing the following behaviour   In edit mode, when saved (using persist...
  • dm-p's avatar
    dm-p
    5 years ago

    Hi kenwang,

    Properties are only intended to be persisted in edit mode, as they are bound the the visual's metadata and are not user-specific, so a save is required to the report for them to remain.

    If you have multiple people reading the report and setting their preferences, this would result in everyone's changes getting lost one ofter the other (if this were possible) as you can't guarantee when the report was last opened by a user, and what state the properties were in when they did, meaning that earlier changes from one user might be overwritten by another user.

    This is the kind of thing that something like cookies are ideal for, but unfortunately they are not enabled in the visual sandbox.

    Ii's possible that the local storage API might be something that could be leveraged, but this has a high bar to entry (visual must be certified and whitelisted by visuals team).

    Other than that, it might be possible to store/retrieve user preferences via web services, but this comes with its own security challenges, particularly if wanting to submit to AppSource, as you'd need to ensure reliability and security of such an infrastructure, as well as establishing some kind of user-specific token. Additionally if you were submitting to AppSource and looking to certifiy, this would count as an external call and would be likely to fail.

    In short, I don't think so, there is, unfortunately 😞 But, you could try asking the team directly if they have any other thoughts on this - [email protected]

    Regards,

    Daniel