library_form_question_move ()

library_form_question_move ()

Function prototype

library_form_question_move (session, form , question, [after_question])

API Version

2.7.24 and higher

Changes the position of an ITEM TEMPLATE in a FORM TEMPLATE.

The active user must have role PROGRAM_EDITOR in the TEAM owner of the PROGRAM to be able to modify the FORM TEMPLATE OBJECT

Moves an ITEM TEMPLATE from its current position in a FORM TEMPLATE to a new position after the question defined by after_question (or at the beginning of the FORM TEMPLATE if null).

When a the FORM TEMPLATE contains arrays of ITEMS, the movement may have some effects on the ITEM TEMPLATE, apart from its position:

  • When the ITEM moved is part of an array and it is moved after another ITEM that it is not part of an array, then the ITEM moved will not belong to an array anymore.

  • When an ITEM is moved into an array, it will become part of the array

Input parameters:

Output parameters:

  • result: empty

  • ErrorMsg: If any error occurs, then this value contains a description of the error translated to the current language

  • ErrorCode: If any error occurs, then this value contains any of the standard ERROR CODES

Request sample:

library_form_question_move ( “LCAAAAAAAAAAAA”, "5654", "3", “6” );

Response sample:

<?xml version="1.0" encoding="utf-8" standalone="yes"?> <result></result> <ErrorMsg></ErrorMsg> <ErrorCode></ErrorCode>





Return Error codes

ERROR CODE



ERROR CODE



INVALID_TOKEN

The session token provided is not valid

INSUFFICIENT_PRIVILEGES

The session user does not have the necessary privileges to modify a FORM TEMPLATE OBJECT

TEMPLATE.NOT_PRESENT

The FORM TEMPLATE OBJECT referred by form was not found

QUESTION.NOT_FOUND

One of the ITEM TEMPLATE OBJECT referred by question or after_question do not exist or belong to a different FORM TEMPLATE OBJECT