Undefined error occurred while creating schema

an issue with a schema I created for a CardView in my project. The CardView contains a text box and an index label. However, every time I run the application, appear as undefined and application get closed.
Here is my schema template
{
“name”: “OneEighty”,
“metadata-version”: 1,
“author”: “NiotronionClass”,
“platforms”: [
builder.niotron.com
],
“extensions”: 5,
“keys”: [
“id”
],
“components”: [
{
“id”: “MAIN_CONTAINER”,
“type”: “VerticalArrangement”,
“properties”: {
“AlignHorizontal”: 3,
“AlignVertical”: 2,
“Width”: -2
},
“components”: [
{
“id”: “INDEX_LABEL”,
“type”: “Label”,
“properties”: {
“FontSize”: 16,
“FontTypefaceImport”: “OpenSans-Semibold.ttf”,
“Text”: “0”,
“TextColor”: -25856652
}
},
{
“id”: “CARD_FOR_TEXT_BOX”,
“type”: “NiotronCardView”,
“properties”: {
“AlignHorizontal”: 3,
“AlignVertical”: 2,
“ContentPaddingBottom”: 0,
“ContentPaddingLeft”: 0,
“ContentPaddingRight”: 0,
“ContentPaddingTop”: 0,
“CornerRadius”: 10,
“Elevation”: 0,
“Width”: -2,
“StrokeColor”: -6381922,
“StrokeWidth”: 2
},
“components”: [
{
“id”: “TEXT_BOX”,
“type”: “TextBox”,
“properties”: {
“BackgroundColor”: 1048575,
“FontSize”: 18,
“ErrorText”: “Out Of Limit”,
“FontTypefaceImport”: “OpenSans-Semibold.ttf”,
“Width”: -2,
“Hint”: “0”,
“HintColor”: -3355444,
“InputType”: 5,
“TextAlignment”: 1,
“TextColor”: -16777216
}
}
]
}
]
}
]
}

Please help

Here is your solution :white_check_mark:

{
  "name": "OneEighty",
  "metadata-version": 1,
  "author": "NiotronionClass",
  "platforms": [
    "builder.niotron.com"
  ],
  "extensions": 5,
  "keys": [
    "id"
  ],
  "components": [
    {
      "id": "MAIN_CONTAINER",
      "type": "VerticalArrangement",
      "properties": {
        "AlignHorizontal": 3,
        "AlignVertical": 2,
        "Width": -2
      },
      "components": [
        {
          "id": "INDEX_LABEL",
          "type": "Label",
          "properties": {
            "FontSize": 16,
            "FontTypefaceImport": "OpenSans-Semibold.ttf",
            "Text": "0",
            "TextColor": -25856652
          }
        },
        {
          "id": "CARD_FOR_TEXT_BOX",
          "type": "NiotronCardView",
          "properties": {
            "AlignHorizontal": 3,
            "AlignVertical": 2,
            "ContentPaddingBottom": 0,
            "ContentPaddingLeft": 0,
            "ContentPaddingRight": 0,
            "ContentPaddingTop": 0,
            "CornerRadius": 10,
            "Elevation": 0,
            "Width": -2,
            "StrokeColor": -6381922,
            "StrokeWidth": 2
          },
          "components": [
            {
              "id": "TEXT_BOX",
              "type": "TextBox",
              "properties": {
                "BackgroundColor": 1048575,
                "FontSize": 18,
                "ErrorText": "Out Of Limit",
                "FontTypefaceImport": "OpenSans-Semibold.ttf",
                "Width": -2,
                "Hint": "0",
                "HintColor": -3355444,
                "InputType": 5,
                "TextAlignment": 1,
                "TextColor": -16777216
              }
            }
          ]
        }
      ]
    }
  ]
}

Can you tell me. Where I made mistake

I think he just Format the code

Sure, why not?

I’ve replaced all the and symbol with ". Then just formatted to look nice.

1 Like

If you have got your answer then please make a habit to mark them correctly

Thank you :slightly_smiling_face:

Still I am getting error undefined

i think you are using kodular

No sir, I am using Niotron
Here is my block

Try this, it should be working as expected.

{
  "name": "Generated Schema",
  "metadata-version": 1,
  "author": "JEWEL",
  "platforms": [
    "Niotron"
  ],
  "extensions": {},
  "keys": [],
  "components": [
    {
      "id": "MAIN_CONTAINER",
      "type": "VerticalArrangement",
      "properties": {
        "AlignHorizontal": 3,
        "AlignVertical": 2,
        "Width": -2
      },
      "components": [
        {
          "id": "INDEX_LABEL",
          "type": "Label",
          "properties": {
            "FontSize": 16,
            "FontTypefaceImport": "OpenSans-Semibold.ttf",
            "Text": "0",
            "TextColor": -25856652
          }
        },
        {
          "id": "CARD_FOR_TEXT_BOX",
          "type": "NiotronCardView",
          "properties": {
            "AlignHorizontal": 3,
            "AlignVertical": 2,
            "ContentPaddingBottom": 0,
            "ContentPaddingLeft": 0,
            "ContentPaddingRight": 0,
            "ContentPaddingTop": 0,
            "CornerRadius": 10,
            "Elevation": 0,
            "Width": -2,
            "StrokeColor": -6381922,
            "StrokeWidth": 2
          },
          "components": [
            {
              "id": "TEXT_BOX",
              "type": "TextBox",
              "properties": {
                "BackgroundColor": 1048575,
                "FontSize": 18,
                "ErrorText": "Out Of Limit",
                "FontTypefaceImport": "OpenSans-Semibold.ttf",
                "Width": -2,
                "Hint": "0",
                "HintColor": -3355444,
                "InputType": 5,
                "TextAlignment": 1,
                "TextColor": -16777216
              }
            }
          ]
        }
      ]
    }
  ]
}

@One_for_Eighty try the schema given by @JEWEL_JONY

No this is also not working

Is there any way to create template manually

@One_for_Eighty you can go through this guide, you will know how to generate the schema

1 Like