Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do you remove an element from a Textlist field?

element field remove
0
10 Posted

How do you remove an element from a Textlist field?

0
10

You can use the LotusScript Evaluate function to run the Notes V3 version of this FAQ. If you prefer a pure LotusScript version, this example takes a text list (tl1) with the values “Elem1″:”Elem2″:”Elem3” and turns it into “Elem1″:”Elem3”. You will have to do some fiddling with the Redim Statement to make sure that you have enough space (eg, the element you wish to remove is not in the list).

0

You can use the LotusScript Evaluate function to run the Notes V3 version of this FAQ. If you prefer a pure LotusScript version, this example takes a text list (tl1) with the values “Elem1″:”Elem2″:”Elem3” and turns it into “Elem1″:”Elem3”. You will have to do some fiddling with the Redim Statement to make sure that you have enough space (eg, the element you wish to remove is not in the list). Dim db As NotesDatabase Dim ws As New NotesUIWorkspace Dim session As New NotesSession Dim i As Integer Dim j As Integer Dim textList As Variant Dim outList As Variant Set uidoc = ws.CurrentDocument ‘ get the current uidoc Set doc = uidoc.Document ‘ get the backend doc textList = doc.GetItemValue(“tl1”) ‘ Get the list and put it in a variant Redim outList(Ubound(textList)-1) As Variant ‘ Dim the outlist j = 0 For i = 0 To Ubound(textlist) ‘ Loop through and check for the element to be removed If textList(i) <> “elem2” Then ‘ Check for the value to replace (could be a variable) outList(j) = textLi

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.