04-19-2022 07:06 PM - edited 04-19-2022 09:42 PM
Hello,
The customer would like to explain a dollar variance between Budget and Actual by leveraging 4 columns of data to explain the difference displayed: enter a dollar amount, a combo box to select a type of UD1 data timing (Perm/Temp) and another combo box to select UD8 driver type (Audit Change/Scope Change) with the last column for a comment.
The comment input cell has the following: V#Annotation with UD3&UD5 based upon the CV POV selection and the remaining UD's set to None; V#Annotation:UD1#None:UD8#None.
For reporting purposes the customer would like to associate the commentary entered with the Combo Box selections made for UD1 and UD8.
V#Annotation:UD1#Perm:UD8#AuditChange
What is the best method to do this?
I have tried the following:
api.Data.Calculate("U8#AuditChange:V#Annotation:U1#Perm":O#Import" _
& " = U8#None:V#Annotation:U1#None:O#Top")
04-21-2022 09:06 AM
Hi Daisy - I am not sure I totally follow...are you trying to move or copy the comment the user entered? If so, api.Data.Calculate will not work for copying annotations or commentary. Something like the below would work.
Dim yourText As String = api.Data.GetDataCellEx("U8#AuditChange:V#Annotation:U1#Perm:O#Import").DataCellAnnotation
api.Data.SetDataAttachmentText("U8#None:V#Annotation:U1#None:O#Top",yourText,False)
04-21-2022 11:30 AM
To piggyback on Jon's reply. Annotations are attachments by nature, so they can't be treated as regular data cell in your code. So you need to attach them to the respective datacells in the way Jon suggested.
04-21-2022 04:48 PM