The xAssets API - Method : SpecialBulkUpdate

Summary

Bulk update a list of assets with a single piece of Asset XML.

This will update only fields with a value specified in the XML, if a field is blank in the XML or absent, it will not be updated in each Asset record.

Parameters

Parameter : sXML

Standard format XML in the form given by the AssetXML function with Argument(0)="EDIT"

Parameter : sArguments

0
A comma separated list of assets to be bulk-updated

Returns

An empty string if successful, or otherwise an error message is returned

Syntax and Examples

Restful syntax with Microsoft Visual Basic

Example 1 - Set the Location of Assets 3,4 and 5 to have LocationID 7 and CostCentreID 11

There is no restful call for this API operation - use a SOAP method instead

SOAP Syntax with Microsoft Visual Basic

Example 1 - Set the Location of Assets 3,4 and 5 to have LocationID 7 and CostCentreID 11


    Try

        ErrorMessage = ""

        Return w.WebSaveSpecial(_hash, _username, _db, _ip, "<A_T><A_R><LID>7</LID><CC1ID>11</CC1ID></A_R></A_T>", "SpecialBulkUpdate", {"<A_T><A_R><LID>7</LID><CC1ID>11</CC1ID></A_R></A_T>"}, False, _dns, _port, _scheme, _nonce, _noncedate)

    Catch ex As Exception
        ErrorMessage = ex.Message
        Return "
    End Try

                            

AMSX Syntax

Example 1 - Set the Location of Assets 3,4 and 5 to have LocationID 7 and CostCentreID 11


    SaveSpecial "SpecialBulkUpdate","<A_T><A_R><LID>7</LID><CC1ID>11</CC1ID></A_R></A_T>"
                        

XCS Syntax

Example 1 - Set the Location of Assets 3,4 and 5 to have LocationID 7 and CostCentreID 11


    Dim ret as String = Server.SaveSpecial("SpecialBulkUpdate","<A_T><A_R><LID>7</LID><CC1ID>11</CC1ID></A_R></A_T>")
    If ret = " Or ret.Substring(0, 8) = "special=" Then
        MsgBox("Save operation completed.", vbInformation, "Save Data")
    Else
        MsgBox("Save operation failed:" & ret, vbExclamation, "Save Data")
    End If
                        

Download the Visual Studio API Samples Project

Return to the API Index Page

© xAssets 2023 All rights reserved.