pixiInfoSettingsHist
Returns the change history of Pixi settings within a date range, newest changes first, optionally limited to a number of rows.
Reads the setting change log from the table SettingsHist and returns one row per logged change.
- The effective change date of an entry is
UpdateDate, orCreateDateifUpdateDateis empty. The same logic applies to the employee:UpdateEmp, otherwiseCreateEmp. - Only entries whose effective change date lies between
FromDateandToDate(both inclusive) are returned. - If
FromDateis omitted,NULLor has a year before 1990, it is set to1970-01-01, so there is no lower bound. - If
ToDateis omitted,NULLor has a year before 1990, the current date and time is used. - The result is sorted by the effective change date in descending order (newest first).
- If
Rowsis greater than 0, only that many rows are returned (viaSET ROWCOUNT). With0(default) all matching rows are returned.
Notes
- The table is read
WITH(NOLOCK), so uncommitted changes may appear. ToDateis compared including the time part. A value such as2024-03-31(midnight) excludes changes made later on that day; pass2024-03-31T23:59:59or the following day to include the whole day.- Filtering on an
ISNULLexpression prevents index use on the date columns; on large history tables, narrow date ranges or aRowslimit are advisable. - The exact data types of the columns of
SettingsHistare not visible in the code.
Tables used
| Parameter | Type | Default | Description |
|---|---|---|---|
FromDate
|
datetime dateTime |
NULL |
Start of the date range (inclusive) for the effective change date. Example: |
ToDate
|
datetime dateTime |
NULL |
End of the date range (inclusive) for the effective change date. Example: |
Rows
|
int | 0 |
Maximum number of rows to return. Example: |
Result set 1 · Always (may be empty)
Logged setting changes in the date range, newest first.
| Column | Type | Description |
|---|---|---|
SettingName
Nullable |
string |
Name of the changed setting. |
OldSettingValue
Nullable |
string |
Value of the setting before the change. |
NewSettingValue
Nullable |
string |
Value of the setting after the change. |
UpdateDate
Nullable |
dateTime |
Effective change date: |
CreateEmp
Nullable |
string |
Employee who made the change: |
HistRemark
Nullable |
string |
Remark stored with the history entry. |
Response example
<SqlRowSet1>
<row>
<SettingName>DefaultShippingMethod</SettingName>
<OldSettingValue>DHL</OldSettingValue>
<NewSettingValue>UPS</NewSettingValue>
<UpdateDate>2024-03-15T10:42:00</UpdateDate>
<CreateEmp>MM</CreateEmp>
<HistRemark>Changed via settings dialog</HistRemark>
</row>
<row>
<SettingName>InvoiceCopies</SettingName>
<OldSettingValue>1</OldSettingValue>
<NewSettingValue>2</NewSettingValue>
<UpdateDate>2024-02-01T08:15:30</UpdateDate>
<CreateEmp>AB</CreateEmp>
<HistRemark/>
</row>
</SqlRowSet1>
POST https://apigateway.descartes.com/tms/pixi/
Content-Type: text/xml; charset=utf-8
Authorization: Basic BASE64(USERNAME:PASSWORD)
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://apigateway.descartes.com/tms/pixi/">
<SOAP-ENV:Body>
<ns1:pixiInfoSettingsHist>
<!-- <FromDate>2024-01-01T00:00:00</FromDate> -->
<!-- <ToDate>2024-03-31T23:59:59</ToDate> -->
<!-- <Rows>100</Rows> -->
</ns1:pixiInfoSettingsHist>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
curl -X POST 'https://apigateway.descartes.com/tms/pixi/' \
--user 'USERNAME:PASSWORD' \
--header 'Content-Type: text/xml; charset=utf-8' \
--data-binary @- <<'XML'
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://apigateway.descartes.com/tms/pixi/">
<SOAP-ENV:Body>
<ns1:pixiInfoSettingsHist>
<!-- <FromDate>2024-01-01T00:00:00</FromDate> -->
<!-- <ToDate>2024-03-31T23:59:59</ToDate> -->
<!-- <Rows>100</Rows> -->
</ns1:pixiInfoSettingsHist>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
XML
<?php
$soapClient = new SoapClient(null, [
'login' => 'USERNAME',
'password' => 'PASSWORD',
'location' => 'https://apigateway.descartes.com/tms/pixi/',
'uri' => 'https://apigateway.descartes.com/tms/pixi/',
]);
$arguments = [
// 'FromDate' => '2024-01-01T00:00:00',
// 'ToDate' => '2024-03-31T23:59:59',
// 'Rows' => '100',
];
$soapArguments = [];
foreach ($arguments as $name => $value) {
$soapArguments[] = new SoapVar($value, XSD_STRING, '', '', $name);
}
$response = $soapClient->__soapCall('pixiInfoSettingsHist', $soapArguments);
- SQL object:
- dbo.pipiInfoSettingsHist