Copy richttextitem from docA to docB with different fieldname - xpages

In SSJS I would like to copy richt text field from doc A to another richt text field in doc B. the fields on source and target document have different names.
How can I establish such?

Related

Create lookup to name field document set

I want to create a lookup column that references the 'Name' field of a document set.
I can only choose document titles but I want to reference the document set name that the user gives to it. Is there an option to achive
Per my test and knowledge, there is no option to use document set name as reference in the lookup column.

Sharepoint or PowerApps - how add multiple doc links in a List to a document list

I have different document types that need to go in different columns of my Sharepoint List. How do I add multiple links per column/row to specific documents in their list?
My Main List looks like this:
ProductType ProductPart Country RegDocTypeA RegDocTypeB OtherDoc
Cabinet PartA USA;DEU DocA1URL;DocA2URL DocB1URL;DocB2URL Note1URL
...
DocLibraries:
*RegulatoryDocTypesA*
Title Attachment Expiration
DocA1 DocA1(Attached) 12/1/2023
DocA2 DocA2(Attached) 12/2/2024
*RegulatoryDocTypesB*
Title Attachment Expiration
DocB1 DocB1(Attached) 12/1/2025
DocB2 DocB2(Attached) 12/3/2026
*OtherDocList*
Title Attachment Expiration
Note1 Note1(Attached)
Note2 Note2(Attached)
How do I get these links attached in my Main List, that point to each document in the DocumentLists? I can't have just one Attachment column in my Main List, because the documents are categorized and have different expirations. I think the best way to do this is a live link to the document in the separate document libraries from the main list. But I can't find a good example or video how to do it. I'd like to populate the title automatically with the document name in the document library so it's visible in the selection combo.
I was looking at multiple attachments, and attachments, and multiple attachment columns, and file title with filename, and title with name.
This is with sharepoint 365. Thanks!
This works now. Sorry I can't add pictures, since I'm only 100/new member.
Added in Power Apps, a new field . Deleted the input field, added combo box input. This has been set up in sharepoint as a column of lookup type, with the source list as the doc library RegulatoryDocTypeA, and allows multiple selections.
The doc library needed these changes:
Add title in doc library through all documents menu, edit current view, chooose title...
a. In doc library, choose integrate->power automate->see your flows.
b. New flow+, automated cloud flow, give it a flow name, when a file is created or modified (properties) sharepoint.
c. site address: your link, library: regulatoryDocTypesA, last one blank for folder (+new step)
d. control; condition; choose value first one: title, is equal to: name
e. in the "if no" box: add action; search for: update file properties; sharepoint; update file properties.
f. Address: your link; library: RegulatoryDocTypeA; id:id; title: search - filename with extension; save.
g. ctrl f5; delete files if already in doc library. Drag files in again. It takes a while to populate title with name.
h. This doesn't link to the file yet. Just gives a choice.
Add link to doc library for RegulatoryDocTypeA doc added, so it's in main list and can see doc if select it.
a. In RegulatoryDocTypeA doc library, go to settings; library settings; form settings; modify in power apps.
b. Add button with insert at the top (make sure it's on form screen 1, which is outer form selected)
c. select button so it's highlighted. In formula field, add Launch(SharePointIntegration.Selected.'Link to item')

SP13 Calculated fields in word file

I would to display in my .doc file, by a quickpart of an calculated field on Sharepoint.
For example, i have a column (calculated field) named "Ref" which get a value automatically. And i want to display the value of the column "Ref" in my word file.
is that possible?
Thank you
Yes this is possible. Add you document to the document library, open it using your word client and use the 'insert'-tab > Quickparts > Document properties and there you will find all list columns concerning your item.
More info: https://www.premierpointsolutions.com/training/help-and-how-to-articles/add-sharepoint-metadata-to-word-documents/
Apparantly, calculated fields are not available. You can solve this by adding a workflow and upon list creation, copying the calcultated field to a 'normal' text field. Then use that text field in your documents.

Lotus Notes: What will be the view selection formula to select a form which is in different database?

My view is one application and a required form along with few fields are in different application.
Point one: A View's selection formula does not "select a form". It selects documents. These documents are (usually) created with a Form, and they (usually) contain an item called "Form" which contains the name of the Form that they were created with. So a selection formula SELECT Form = "Foo" means that the view will show all documents with an item named Form that contains the value "Foo".
Point two: A View can only select documents that are in the same database that contains the View. It cannot select documents that exist in another database.
Ergo, there is no possible forumla that selects documents in another database that were created with a given Form.
I'm assuming you probably have some keyword documents in a different database, and you'd like to use a key in the main document to pull some matching information from the keyword database. In other words, you'd like to do a "join" in your Notes view.
You can't do this, never mind whether the documents are in the same database. This is not a relational database.
There are options, however.
You could create a "user definable" column and automatically update the column formula in a profile document so that the formula can calculate the keyword correspondences. You would have a periodic agent look at the keyword database and construct an updated formula such as, #Select("a"; "b"; "c";...; ChoiceNo) to convert the number field ChoiceNo to the value "a" (for 1), "b" (for 2), etc. If you can write a formula to display the correct values for the current keywords, this is workable provided the list never gets too long.
Domino servers are capable of accessing a DB2 relational database to construct a view index, using a feature called DB2NSF. So you can actually do a join -- but your NSF data has to be stored in DB2 as its back-end, rather than beinf stored in the NSF, for this to work. This is probably going to be more work than it's worth to you for this application.
If it is an XPages application, you can create your own data set however you like for feeding to a repeat control.

Existing documents can be found and updated with imported data (using view lookup or database search).

I have a list of ID and Color in excel sheet.
I need to import file and check existing if any changes to the color value.
If there is any changes, I need to update new value and recored old value in history field.
How do I do this?
First, save the Excel spreadsheet as a CSV file, it will be much easier to import it then. Use the file functions in Lotusscript.
Next, write your Lotusscript agent. You have the solution in the headline of your question, so I am not really sure what you are asking.
You could use the GetDocumentByKey() method of the NotesView class to get the document based on the ID, then compare the value of the color field in that document. If it is the same, go to the next document, otherwise add the existing value to teh history field and replace it with the new value, then go to the next document.
Another, and much faster, way would be that you read all the new values into a list, with the ID as list tag and color value as list item. Make sure you have a view with the document ID as one of the columns and color value as another. Create a NotesViewEntryCollection object, then use the GetFirstEntry/GetNextEntry methods to loop through the collection. For each entry, use the ColumnValues() method to get the value if the ID column, and use IsElement to check if that value exists in the list you created. If it does exist, you compare the list item value with the value of the color column. If they are different, open the document, update the history field and replace the old color value with the new value.

Resources