Skip to main content
November 22, 2023

Reading Data Attachment Objects from a Data Attachment List

  • November 22, 2023
  • 1 reply
  • 0 views

Hello All,

I am creating a confirmation rule with the following goal:

- Read data attachment text from from a V#Annotation field 

Due to my unfamiliarity with the DataAttachmentList object, I have been unsuccessful in utilizing this list within my rule. I wanted to reach out to the community and see if anyone could help correct my mistakes. My code for testing is as follows:


Ginger_Main_0-1700665989361.png

 

 

1 reply

November 23, 2023

A guess would be that "List(Of Items)" does not match "DataAttachment". Try below

For Each item As DataAttachment In CommentaryVar.Items
  Brapi.ErrorLog.LogMessage(si, item.Text)
Next

'' or just

For Each item in api.Data.GetDataAttachments(.....
  Brapi.ErrorLog.LogMessage(si, item.Text)
Next

For future questions, including something like compiler output/error messages makes it easier to troubleshoot 🙂