Variable Config Single Select

Modified on Mon, 11 Apr 2022 at 03:56 PM

This article is outdated, you can access the most current version here: https://doc.onedata.de/apps/apps-docs/odml-documentation/AppBuilder/elements/VariableSingleSelectElement.html


Variable Config Single Select

type = "variableConfigSingleSelect"

With this Element you can switch between different values of a Variable.


Properties

Property
Type
Description
Example Value
id
string
The unique id assigned to the Element
  "id": "variableConfig" 
type
string
Type of the Element
  "type": "variableConfigSingleSelect"

config
object
Configuration of the Element
  "config": {
    // Name of the variable
    "variable": "agg",
    "options": [],
    // Label which is displayed above the Dropdown 
    "label": "Select your Variable Value"  }
config.
options
(origin = "raw")
object
Configuration of the Element with raw values
  {
    // Label which is displayed in the Dropdown
    "label": "Valueset1",
    // Id of the variable set
    "id": "vals1",
    // Origin of the data
     "origin": "raw || data",
     "value": {
      // Value for variable "agg.sub1"
      "sub1": "val1",
      // Value for variable "agg.sub2"
      "sub2": "val2"
     }  
  }
config.
option
(origin = "data")
object
Configuration of the options with values from a frt
  // Datasource Id
  "source": "frt_testSource",
  "config": {
    "options": [
      {
        "id": "vals0",
        "origin": "data",
        // Column of the displayed labels in the
         // dropdown (if no one is set the values
        // of the valueColumn will be displayed)
        "labelColumn": "Company",
        "valueColumn": "Rank"
      }
    ]


Example

{
  "id": "variableConfig",
  "type": "variableConfigSingleSelect",
  "config": {
    "variable": "agg",
    "options": [
      {
        "label": "Valueset1",
        "id": "vals1",
        "value": {
          "sub1": "val1",
          "sub2": "val2"
        }
      },
      {
        "label": "Valueset2",
        "id": "vals2",
        "value": {
          "sub1": "val5",
          "sub2": "val6"
        }
      }
    ],
    "label": "Select your Variable Value"
  }
}

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article