movePageTypeFieldValueInsertBefore()

Pixelsilk API function to change the field's list order when a value is dragged to above another value--requires the advanced-admin-access permission
Parameters:
pageTypeId: unique identifier of the page type
fieldId: unique identifier of the field
valueToMoveId: unique identifier of the value to move
valueToInsertBeforeId: unique identifier of the value to insert it before

Output:
The function movePageTypeFieldValue returns void.

C# Example:
Guid pageTypeId = <page type's id>;
Guid fieldId = <field's id>;
Guid valueToMoveId = <moving values's id>;
Guid valueToInsertBeforeId = <id of value to insert before>;
MovePageTypeFieldValueInsertBefore(pageTypeId, fieldId, valueToMoveId, valueToInsertBeforeId);
Note the capital first letter of the C# method.

HTTP Example:
Request Headers:
POST /api2/movePageTypeFieldValueInsertBefore HTTP/1.1
HOST: www.example.com
Content-Length: 354
Content-Type: application/x-www-form-urlencoded
Cookie: auth=4B874C7B9E9F...25CC9540E836

Request Data:
Unencoded Data:
json={
   "pageTypeId":"031ce0ac-24c1-4254-a7ec-82a4d7fe5c8e",
   "fieldId":"325770a4-5d4c-46eb-a7b1-3780efac8c78",
   "valueToMoveId":"c8b3509f-59b8-498b-8d5b-865e9db1745d",
   "valueToInsertBeforeId":"4d1744d0-d964-47d1-bc46-119470aa5742"
}&token=7AdbNHZQBtwc...RPTEK8UvSUQ=

Url-encoded Data:
json=%7b%0d%0a+++...%22%0d%0a%7d&token=7AdbNHZQBtwc...TEK8UvSUQ%3d

Response Headers:
HTTP/1.1 200 OK
Set-Cookie: auth=09551790444C...B2E94E6E81E; path=/
Content-Type: text/javascript; charset=UTF-8
Content-Length: 2

Response Data:
{}

JavaScript Example:
Method Call:
pixelsilk2.movePageTypeFieldValueInsertBefore(input, callback);

Input Object:
{
    pageTypeId:"031ce0ac-24c1-4254-a7ec-82a4d7fe5c8e",
    fieldId:"325770a4-5d4c-46eb-a7b1-3780efac8c78",
    valueToMoveId:"cf568c00-1722-483f-8179-3628283f4996",
    valueToInsertBeforeId:"4d1744d0-d964-47d1-bc46-119470aa5742"
}

Returned Data:
{}

Back to Page Types »