[Error]: Expected a unique ID, got 'list_layout1'.Please Guide,it wud be great help

I’ve created custom list via dynamic components schema thats working fine but here the problem is I’m getting is error : Expected a unique ID, got ‘list_layout1’ upon start of creating dynamic compo.

Here are the schema:-

{
    "name": "COMM_MANAG",
    "metadata-version": 1,
    "extension_version": 5,
    "author": "<your name>",
    "platforms": [
        "creator.kodular.io"
    ],
    "keys": [
    "id",
    "image",
    "vid_txt",
    "line_ha",
    "vid_row",
    "vid_name",
    "vid_ph",
    "vid_meet",
    "line_ha_copy"


    ],
    "components": [
        {
            "id": "list_layout{id}",
            "type": "MakeroidCardView",
            "properties": {
                "AlignVertical": 2,
                "ContentPaddingBottom": 3,
                "ContentPaddingLeft": 3,
                "ContentPaddingRight": 3,
                "ContentPaddingTop": 3,
                "CornerRadius": 8,
                "FullClickable": true,
                "Height": 150,
                "Width": -2
            },
            "components": [
                {
                    "id": "outer_layout{id}",
                    "type": "HorizontalArrangement",
                    "properties": {
                        "AlignVertical": 2,
                        "Height": -2,
                        "Width": -2
                    },
                    "components": [
                        {
                            "id": "image_va{id}",
                            "type": "VerticalArrangement",
                            "properties": {
                                "AlignVertical": 2,
                                "Height": -2,
                                "Width": 100
                            },
                            "components": [
                                {
                                    "id": "Card_View1{id}",
                                    "type": "MakeroidCardView",
                                    "properties": {
                                        "AlignHorizontal": 3,
                                        "AlignVertical": 2,
                                        "BackgroundColor": 16777215,
                                        "ContentPaddingBottom": 0,
                                        "ContentPaddingLeft": 0,
                                        "ContentPaddingRight": 0,
                                        "ContentPaddingTop": 0,
                                        "CornerRadius": 100,
                                        "Height": 100,
                                        "Width": 100
                                    },
                                    "components": [
                                        {
                                            "id": "image{id}",
                                            "type": "Image",
                                            "properties": {
                                                "Height": -2,
                                                "Width": -2,
                                                "Picture": "{image}",
                                                "ScalePictureToFit": true
                                            }
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "id": "info_va{id}",
                            "type": "VerticalArrangement",
                            "properties": {
                                "Height": -2,
                                "Width": -2
                            },
                            "components": [
                                {
                                    "id": "vid_ha{id}",
                                    "type": "HorizontalArrangement",
                                    "properties": {
                                        "AlignHorizontal": 2,
                                        "Width": -2
                                    },
                                    "components": [
                                        {
                                            "id": "vid_txt{id}",
                                            "type": "Label",
                                            "properties": {
                                                "BackgroundColor": 4279046693,
                                                "FontBold": true,
                                                "FontSize": 25,
                                                "FontTypefaceImport": "Poppins-Medium.ttf",
                                                "Text": " # {vid_txt} ",
                                                "TextColor": 4286499482
                                            }
                                        }
                                    ]
                                },
                                {
                                    "id": "line_ha{id}",
                                    "type": "HorizontalArrangement",
                                    "properties": {
                                        "BackgroundColor": 4293848814,
                                        "Height": 2,
                                        "Width": -1025
                                    }
                                },
                                {
                                    "id": "vid_row{id}",
                                    "type": "Label",
                                    "properties": {
                                        "FontSize": 18,
                                        "FontTypefaceImport": "Poppins-Medium.ttf",
                                        "Height": 24,
                                        "Text": "{vid_row}",
                                        "Visible" : false,
                                        "TextColor": 4268582502

                                    }
                                },
                                {
                                    "id": "vid_name{id}",
                                    "type": "Label",
                                    "properties": {
                                        "FontSize": 18,
                                        "FontTypefaceImport": "Poppins-Medium.ttf",
                                        "Height": 24,
                                        "Text": "{vid_name}",
                                        "TextColor": 4268582502
                                    }
                                },
                                {
                                    "id": "vid_ph{id}",
                                    "type": "Label",
                                    "properties": {
                                        "FontItalic": true,
                                        "FontSize": 14,
                                        "Text": "PH. {vid_ph}",
                                        "TextColor": 4267662428
                                    }
                                },
                                {
                                    "id": "vid_meet{id}",
                                    "type": "Label",
                                    "properties": {
                                        "BackgroundColor": 4294896187,
                                        "FontItalic": true,
                                        "FontSize": 15,
                                        "FontTypefaceImport": "Poppins-Medium.ttf",
                                        "Text": " {vid_meet} ",
                                        "TextColor": 4279046693
                                    }
                                },
                                {
                                    "id": "line_ha_copy{id}",
                                    "type": "HorizontalArrangement",
                                    "properties": {
                                        "BackgroundColor": 4293848814,
                                        "Height": 2,
                                        "Width": -1025
                                    }
                                }
                            ]
                        }
                    ]
                }
            ]
        }
    ]
}

I’d already viewed many topics regarding same but can’t solve.

Anyone from community could please help regard same?? It would be a very great help

the schema looks good, surely you are trying to reload the function and the id is repeated, you must increase that ID value or remove the elements created previously.

I think the green blocks are to spare, you can do it from the same json

I tried the same but actually some property of elements is not working if I even set in JSON like background color,txtcolor,font,etc thus made these green blocks…Although I think the problem is from main card i.e “list_layout{id}”

could you guide why the error is coming for “list_layout1”?

“list_layout{id}” is the first of the errors, it will happen with all the following.

before executing “custom_list” or at the beginning, place the following block, it will eliminate all the elements previously created, that is, it will delete the list, and if not you should use a variable to store and increment the values ​​for the IDs

image

to assign colors inside the json you have to use negative decimal values ​​(-164582)… there are many options to convert hexadecimal

Ohh,it is working fine now!! :grinning:
Thanks a lot for your help!!!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.