ProJob - get job questions based on input values

API Url

Use it to create questions for projob base registration elements

PUT
http://localhost:16010/ProMarkREST/web/ProJob/orders/{order_id}/operations/{operation_id}/types/{type}/registration-wizard

Permissions: user

Path parameters

FieldTypeDescription
operation_idString

Operation identifier

order_idString

Order identifier

typeString

Job registration type

Query parameters

FieldTypeDescription
transSeqoptionalNumber

Transaction sequence of transhdr

Parameter

FieldTypeDescription
requestObject

Main object containing the request data.

  dataObject

Object containg data to be uploaded.

    questionsObject[]

Collection with questions and answers used in the wizard. This is basically a carrier (in-out) collection between client-server.

      callBackOnChangeBoolean

true = After value is changed, do a callback to the server with the entire collection. This is because subsequent values depend on the question answer. Not to be changed on the client!

      dataTypeNumber

Data type of the question (0: Text, 1: Integer, 2: Decimal, 3: Boolean: 4: Date. 5: Time of day, 6: Date and time, 7: Time duration, 8: Time interval, 9: Date interval, 10: Date and time interval). Not to be changed on the client!

Size range: 0-10
      inputTypeNumber

Suggestion with controll type to display on the client (0: Standard input, depends on 'dataType', 1: Fill-in, 2: Drop-down, 3: Combo-box, 4: Text area, 5: Radio-set, 6: Check-box, 7: Selection list, 8: Calendar, 9: Calendar drop-down, 10: External lookup URI). Not to be changed on the client!

Size range: 0-11
      isMandatoryoptionalBoolean

true = It is mandatory to enter an answer (select a value) on the question. Not to be changed on the client!

      labelString

Label to display on the question. Not to be changed on the client!

      lookupURIoptionalString

If collection of 'values' is not sent with the request, then use this URI to bind to remote data. Typically this is used for large amounts of data, where server paging and server filtering is enabled. Be aware, data schema might be different, depending on external lookup resource. Do not change by the client!

      orderNumber

Order of question. Sort by this value. Not to be changed on the client!

      typeNumber

Type of question (0: Registration period, 1: Project, 2: Activity, 3: Split dates, 4: Piecework, 5: Time type, 6: Extra Info). Not all questions are part of the wizard and depends on setup and selected values. Not to be changed on the client!

Size range: 0-6
      valuesoptionalObject[]

Collection of possible selectable values. It's used when user needs to select among a list of values, typically for 'inputType' = 2, 3 and 7. Do not change by the client!

        descriptionString

The Description that should be displayed in the list for selection.

        displayIdString

The text to be displayed for selected items. It might be different than 'internalId'.

        sortNoNumber

Order of values to select from.

      subQuestionsoptionalObject[]

Collection of sub questions if any typically for 'inputType' = 2, 3 and 7.

        answerString

This is the answer to the question and needs to be filled by the client. For dates, it's the ISO-8601 string. For date intervals, it's ISO-8601 dates separated by '/'.

        dataTypeNumber

Data type of the question (0: Text, 1: Integer, 2: Decimal, 3: Boolean: 4: Date. 5: Time of day, 6: Date and time, 7: Time duration, 8: Time interval, 9: Date interval, 10: Date and time interval).

Size range: 0-10
        inputTypeNumber

Suggestion with controll type to display on the client (0: Standard input, depends on 'dataType', 1: Fill-in, 2: Drop-down, 3: Combo-box, 4: Text area, 5: Radio-set, 6: Check-box, 7: Selection list, 8: Calendar, 9: Calendar drop-down, 10: External lookup URI, 11: Distribution).

Size range: 0-11
        isMandatoryoptionalBoolean

true = It is mandatory to enter an answer (select a value) on the question.

        labelString

Label to display on the sub question.

        lookupURIoptionalString

If collection of 'values' is not sent with the request, then use this URI to bind to remote data. Typically this is used for large amounts of data, where server paging and server filtering is enabled. Be aware, data schema might be different, depending on external lookup resource.

        orderNumber

Order of values to select from.

        resultFieldString

Field name that is corresponding to its related registration

Request example:

{
"request": {
"data": {
"questions": [
{
"order": 1,
"type": 2,
"label": "Select reason for change condition:",
"inputType": 10,
"dataType": 0,
"lookupURI": "/rest/General/lookup/JobReas?options=CTF",
"resultField": "jobCondition.changeFromReason"
},
{
"order": 2,
"type": 1,
"label": "Select new condition:",
"inputType": 2,
"dataType": 0,
"callBackOnChange": true,
"answer":"RW",
"resultField": "jobCondition.newCondition"
}
]
}
}
}

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data.

    questionsObject[]

Collection with questions and answers used in the wizard. This is basically a carrier (in-out) collection between client-server.

      answeroptionalString

This is the answer to the question and needs to be filled by the client. For dates, it's the ISO-8601 string. For date intervals, it's ISO-8601 dates separated by '/'.

      callBackOnChangeoptionalBoolean

true = After value is changed, do a callback to the server with the entire collection. This is because subsequent values depend on the question answer.

      dataTypeNumber

Data type of the question (0: Text, 1: Integer, 2: Decimal, 3: Boolean: 4: Date. 5: Time of day, 6: Date and time, 7: Time duration, 8: Time interval, 9: Date interval, 10: Date and time interval).

Size range: 0-10
      inputTypeNumber

Suggestion with controll type to display on the client (0: Standard input, depends on 'dataType', 1: Fill-in, 2: Drop-down, 3: Combo-box, 4: Text area, 5: Radio-set, 6: Check-box, 7: Selection list, 8: Calendar, 9: Calendar drop-down, 10: External lookup URI, 11: Distribution).

Size range: 0-11
      isMandatoryoptionalBoolean

true = It is mandatory to enter an answer (select a value) on the question.

      labelString

Label to display on the question.

      lookupURIoptionalString

If collection of 'values' is not sent with the request, then use this URI to bind to remote data. Tipically this is used for large amounts of data, where server paging and server filtering is enabled. Be aware, data schema might be different, depending on external lookup resource.

      orderNumber

Order of question. Sort by this value.

      resultFieldString

Field name that is corresponding to its related registration

      subQuestionsoptionalObject[]

Collection of sub questions if any typically for 'inputType' = 2, 3 and 7.

        answeroptionalString

This is the answer to the question and needs to be filled by the client. For dates, it's the ISO-8601 string. For date intervals, it's ISO-8601 dates separated by '/'.

        dataTypeNumber

Data type of the question (0: Text, 1: Integer, 2: Decimal, 3: Boolean: 4: Date. 5: Time of day, 6: Date and time, 7: Time duration, 8: Time interval, 9: Date interval, 10: Date and time interval).

Size range: 0-10
        inputTypeNumber

Suggestion with controll type to display on the client (0: Standard input, depends on 'dataType', 1: Fill-in, 2: Drop-down, 3: Combo-box, 4: Text area, 5: Radio-set, 6: Check-box, 7: Selection list, 8: Calendar, 9: Calendar drop-down, 10: External lookup URI, 11: Distribution).

Size range: 0-11
        isMandatoryoptionalBoolean

true = It is mandatory to enter an answer (select a value) on the question.

        labelString

Label to display on the sub question.

        lookupURIoptionalString

If collection of 'values' is not sent with the request, then use this URI to bind to remote data. Tipically this is used for large amounts of data, where server paging and server filtering is enabled. Be aware, data schema might be different, depending on external lookup resource.

        orderNumber

Order of values to select from.

        resultFieldString

Field name that is corresponding to its related registration

      valuesoptionalObject[]

Collection of possible selectable values. It's used when user needs to select among a list of values, typically for 'inputType' = 2, 3 and 7.

        descriptionString

The Description that should be displayed in the list for selection.

        displayIdString

The text to be displayed for selected items. It might be different than 'internalId'.

        sortNoNumber

Order of values to select from.

  messageoptionalObject

Object containing response messages.

    codeNumber

Message code.

    textString

Message text.

    typeString

Type of message.

Allowed values:"warning""info"

Success example:

{
"response": {
"data": {
"questions": [
{
"order": 1,
"type": 2,
"label": "Select reason for change condition:",
"inputType": 10,
"dataType": 0,
"lookupURI": "/rest/General/lookup/JobReas?options=CTF",
"resultField": "jobCondition.changeFromReason"
},
{
"order": 2,
"type": 1,
"label": "Select new condition:",
"inputType": 2,
"dataType": 0,
"callBackOnChange": true,
"resultField": "jobCondition.newCondition",
"values": [
{
"sortNo": 1,
"internalId": "",
"displayId": "S",
"description": "Setup"
},
{
"sortNo": 2,
"internalId": "",
"displayId": "R",
"description": "Run time"
},
{
"sortNo": 3,
"internalId": "",
"displayId": "RW",
"description": "Rework"
},
{
"sortNo": 4,
"internalId": "",
"displayId": "QA",
"description": "Quality assurance"
},
{
"sortNo": 5,
"internalId": "",
"displayId": ":FINISHED",
"description": "Finished"
}
]
}
]
}
}
}