xpages - get the attachmentnames out of a form with 2 RTF fields -


I have 2 rich text fields (for exmaple rtf1 and rtf2)

in each field 1 attachment will be uploaded.

For each field, I would like to store the attachment name in any other field (for Xmlap name 1 and 2).

When I get the name of the attachment of RTF 1 in the form for the name of @Subset (@ AttachmentNames; 1) , when I use the same for name 2 I am getting the name of RTF 1 which I do not want

Eventually, if it's the way to do it with SSJs, instead of doing it in the form, it would be good.

It seems that you can not use a simple formula here. Instead you can use related RTF through SSJS, get all the embedded objects (even only one connected) and get its name to store in your text field . Something like this should be done:

The value of your text field, handling your data source, is document1:

  try {var rtf: NotesRichTextItem = document1.getDocument ( ). GetFirstItem ("rtf1"); Var EOS: java.util.Vector = rtf.getEmbeddedObjects (); For (x = 0; x & lt; eos.size (); x ++) {var Eo: notes embedded object = eso Elementaryity (x); Return eo.getName (); }} Hold (e) {}  

not tested, YMMV


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -