Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Server Knowledge Base

Definitive answers from Server experts.

How to Pass List Box Values Using the Gallery API

clarab
Alteryx
Alteryx
Created

How to Pass List Box Values Using the Gallery API

 

This article shows an example of how the available list box values can be retrieved and submitted together to /workflow/{appId}/jobs endpoint.

 

Prerequisites

 
  • Alteryx Server
    • All 
 

    Procedure

     
    1. Use /v1/workflows/{appId}/questions endpoint to get the questions from the app. Here is an example of a response:
    [
      {
        "name": "List Box (11)",
        "type": "QuestionListBox",
        "description": "Select the value",
        "items": [
          {
            "key": "TNG",
            "value": "TNG"
          },
          {
            "key": "STV",
            "value": "STV"
          },
          {
            "key": "TOS",
            "value": "TOS"
          },
          {
            "key": "DS9",
            "value": "DS9"
          },
          {
            "key": "STE",
            "value": "STE"
          }
        ],
        "multiple": "True"
      }
    ]
     
    1. To pass in the selected list box in one of the endpoints below, enter the values in the value name separated by a comma.
      • /v1/workflows/{appId}/jobs
      • /user/v2/workflows/{appId}/jobs
    Here is an example:
    {
      "questions": [
        {
          "name": "List Box (11)",
          "value": "'TNG', 'STV'"
        }
      ]
    }
    
     
    NOTE:  "TNG" and "STV" in the above examples are the values from the "value" name in Step 1.
     

      Additional Resources

      Comments
      jaime_parra
      5 - Atom

      Thanks for the help, It was very useful.

      jmartinezv
      5 - Atom

      Hi, I am trying to pass multiple values to a list box using Gallery API, but it seems that the system is not recognizing the values. Here is an example:

       

      {
      "name": "List Box (501)",
      "value": "'VFX-VFY','GHA-GHX"
      },

       

      Any help?