Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9022297
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T05:28:19+00:00 2026-06-16T05:28:19+00:00

I have a multivalue field on my document that I would like to remove

  • 0

I have a multivalue field on my document that I would like to remove a value based on the value.

I came up with this:

var doc:NotesDocument = rowData.getDocument();
var item:NotesItem = doc.getFirstItem("ValidProjects");
var a:Array = item.getValues()

for (var v in a)
dBar.info("Before removed V=" + v );

removeFromArray(a,compositeData.ProjectID);
doc.replaceItemValue("ValidProjects",a );

for (var v in a)
dBar.info("After removed V=" + v);


doc.save();


function removeFromArray(arr, val) {
for(var i=0; i<arr.length; i++) {
    dBar.info("Value = " + arr[i] + " Remove = " + val);
    if(arr[i] == val) {
        dBar.info("Removing " + i)
        arr.splice(i, 1);
        break;
    }
   }
}

The removeFromArray is being called successfully and I can see the “Removing 0” message displayed in the debugbar as expected but the array does not change at all and the value is not removed. Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T05:28:21+00:00Added an answer on June 16, 2026 at 5:28 am

    Treat the ItemValues as Vector.

    function removeFromItemValues(java.util.Vector vector, val) {
          // see http://docs.oracle.com/javase/6/docs/api/java
          vector.remove(val);
          return vector; //Optional
    }
    

    Hope that helps

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a document structure in Solr that looks something like this (irrelevant fields
I have a multi value cck field. I can read any single id with
I have a multi-value cck field in a drupal node. The field is called
I am newbie in solr, i have a table like this id infield body
I have a multivalue parameter that is populated from a query that returns an
UPDATED, TO BE MORE CLEAR: My current field that contains the value ‘1201026404’ (which
I have a problem that i have a dynamic field in schema.xml as <dynamicField
I have been trying to perform a query on a field that is configured
When creating a list of facet values, I have this in my schema: <field
I have a schema containing a multi-value field of type component link. How can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.