cancel
Showing results for 
Search instead for 
Did you mean: 

Annotation - Comments

DCruz
New Contributor II

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")

3 REPLIES 3

TheJonG
New Contributor III

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)

Koemets
Contributor

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. 

DCruz
New Contributor II

Thanks Jo.  I'll try that option.  Here's a doc I put together to hopefully better explain the intent of the solution that I'm seeking.