Skip to main content
Known Participant
Sep 4, 2020 2:39 PM UTC
Answered

Image Field Value to Set in the Annotation Attachment

Hello All,

 

Q1: I have question regarding Images, If I attached the Image in annonation, is there any we can put that image in the Image field so that user can see?

 

Q2: Is there anyway if user select the image in the Image field we can pass that value that image to annotaion to attach that image file, In short User does not need to browser the image again for the Annoantion. 

 

Thanks for your help in advance 

This topic is closed to new replies. Start a new post to keep the conversation going.
try67
try67Correct answer
Community Expert
Sep 8, 2020 12:24 PM UTC

I'm using below Java Script, it's working, but not able to access JPEG.PNG images from Local machine. Is there anyway we can access Iamges from the below query

var doc = app.browseForDoc();
var one = this.getField(event.target.name);
var docPath = doc.cPath; // gets the file path of the selected file
one.buttonImportIcon(docPath); // uses the selected path to import the image as the "normal" or "up" button icon
this.importDataObject("myDataObjectFileName",docPath); // import the data object

 


Try this: app.browseForDoc({cFileFilter:2})

5 replies

Known Participant
Sep 8, 2020 9:36 AM UTC

Thanks for your reply, If I have attcahed the image in the Image Field, Is there any we can set that Image in the file attcahment at a same time

Translate
try67
Community Expert
Community Expert
Sep 8, 2020 11:51 AM UTC

I don't believe that's possible, either.

Translate
Known Participant
Sep 8, 2020 12:09 PM UTC

I'm using below Java Script, it's working, but not able to access JPEG.PNG images from Local machine. Is there anyway we can access Iamges from the below query

var doc = app.browseForDoc();
var one = this.getField(event.target.name);
var docPath = doc.cPath; // gets the file path of the selected file
one.buttonImportIcon(docPath); // uses the selected path to import the image as the "normal" or "up" button icon
this.importDataObject("myDataObjectFileName",docPath); // import the data object

 

Translate
try67
Community Expert
Community Expert
Sep 4, 2020 8:52 PM UTC

No to both. A script can't access the contents of the selected image in an annotation, only in a field or an Icon object.

Translate