The Bulk Edit function in Infoplus allows you to edit several records at once, but it requires that you put the same values in all records that you're editing at the same time.  


However, you can use an Infoplus Script to perform a custom Bulk Edit, where you can set different values in each record.


The general idea is:

  1. Create a data structure in your script (a simple javascript object) where you create a mapping between record identifiers (typically Id, or maybe SKU on Items, for example) and the values you want for those records.  
  2. When the script is executed, it will be working on a single record at a time - so you will check if the record in the script is defined in your data structure, then get the value from the data structure, put it in the record, and use the infoplusApi object to update the record.
  3. To perform the bulk edit - go to the Table in Infoplus, find the records you want to edit, select them all (with the checkbox), and use Actions -> Bulk Run Script.  


Here's an example of a script doing this, where we are updating UPC values on the Item table:

/////////////////////////////////////////////////////////////////
// set up a data structure mapping item identifiers to values. //
// in this case, we'll map SKU to UPC                          //
/////////////////////////////////////////////////////////////////
var upcMapping = {}
upcMapping['BASIC1'] = "123456789012";
upcMapping['BASIC2'] = "234567890123";
upcMapping['BASIC3'] = "345678901234";
upcMapping['BASIC4'] = "456789012345";
upcMapping['BASIC5'] = "567890123456";

/////////////////////////////////////////////////////////////////////
// if the record passed in to the script is in the data structure, //
// then set the appropriate value in the record, and update it.    //
// remember, custom fields exist at:  record.customField.fieldName //
/////////////////////////////////////////////////////////////////////
if(upcMapping[record.sku])
{
   record.upc = upcMapping[record.sku];
   utils.log("Updating Item [" + record.sku + "] UPC to [" + upcMapping[record.sku] + "]");
   infoplusApi.update("item", record);
}
else
{
   utils.log("No value found for Item [" + record.sku + "] - not updating it.");
}


As an alternative, you may define your data structure as a JSON style object, as in:

var upcMapping = {
"BASIC1": "123456789012",
"BASIC2": "234567890123",
"BASIC3": "345678901234",
"BASIC4": "456789012345",
"BASIC5": "567890123456"
}


For another alternative approach, you may try Using data from a Google Sheet, where we describe directly accessing the data from a Google Sheet, rather than using a javascript data structure.  


If you are attempting to update a custom field, you will need to use the following:  record.customFields.put("customFieldName", customFieldVariable);  - if you're not sure what the custom field name is, you can run the following code and log the response: var customFieldNames = ${record.customFields}     utils.log("Custom Fields are: " +customFieldNames);