07-27-2023 01:39 AM
Hi,
While we copy from Scenario S#Bud1 to S#Bud2, Annotations are not getting copied.
Understand from related posts, it can be achieved using api.Data.SetDataAttachmentText(). Any tried approach using this syntax.
Any leads would be appreciated.
Thanks
Solved! Go to Solution.
07-28-2023 02:27 AM
As a short summary to do this:
1. Create a data table (in memory) using SQL as a source, pulling the existing comments from the table where annotations are stored (make sure to filter by time, scenario and whatever else you can narrow it down)
2. Loop through the filtered records in your data table, and write the annotations back using the SetDataAttachmentText() function for each row in the data table, using the POV from the looped through row adjusted by scenario
The code you need is briefly described in this post, which you are probably already aware of: https://community.onestreamsoftware.com/t5/Rules/Query-on-annotation-data-copy/m-p/7741
Make sure to test this on a low scale first and see if your code works. If you have no experience with code such as this, your implementation partner or the OneStream Remote Consulting team can likely help you (billable) to set this up. To get in touch with the OS Remote Consulting team, just open a ticket with support@onestream.com
07-27-2023
08:03 AM
- last edited on
07-27-2023
09:09 AM
by
JackLacava
Hi,
Please give this post a Kudo so that this might get addressed in a future release 🙂
07-28-2023 02:27 AM
As a short summary to do this:
1. Create a data table (in memory) using SQL as a source, pulling the existing comments from the table where annotations are stored (make sure to filter by time, scenario and whatever else you can narrow it down)
2. Loop through the filtered records in your data table, and write the annotations back using the SetDataAttachmentText() function for each row in the data table, using the POV from the looped through row adjusted by scenario
The code you need is briefly described in this post, which you are probably already aware of: https://community.onestreamsoftware.com/t5/Rules/Query-on-annotation-data-copy/m-p/7741
Make sure to test this on a low scale first and see if your code works. If you have no experience with code such as this, your implementation partner or the OneStream Remote Consulting team can likely help you (billable) to set this up. To get in touch with the OS Remote Consulting team, just open a ticket with support@onestream.com