Dynamic component uniqe id issues

hello koders,
I’m trying some list making with dynamic component extension of @yusufcihan .
but facing issues with “expected a uniqe id, got HorizontalA”

tried many things but failed. I’m giving Details here. Please help me.

DESIGN

BLOCKS.


SCHEMA


{   "name": "Order History ListView",   "metadata-version": 1,   "author": "Morsalin",   "platforms": [     "Kodular"   ],   "keys": [     "count",     "Hbg",     "time",     "from",     "to",     "formp",     "forma",     "toa",     "top",     "user",     "status"   ],   "components": [     {       "id": "HorizontalA{count}",       "type": "HorizontalArrangement",       "properties": {         "AlignVertical": 2,         "BackgroundColor": "{Hbg}",         "HeightPercent": 9,         "Width": -2       },       "components": [         {           "id": "Labela_{count}",           "type": "Label",           "properties": {             "FontSize": 10,             "Heigh": -1,             "WidthPercent": 12,             "Text": "{time}",             "TextAlignment": 1           }         },         {           "id": "Card{count}",           "type": "MakeroidCardView",           "properties": {             "BackgroundColor": 16777215,             "AlignHorizontal": 1,             "AlignVertical": 2,             "Width": -2,             "Height": -2,             "ContentPaddingBottom": 0,             "ContentPaddingLeft": 0,             "ContentPaddingRight": 0,             "ContentPaddingTop": 0,             "Elevation": 0           },           "components": [             {               "id": "Horizontal1C_{count}",               "type": "HorizontalArrangement",               "properties": {                 "AlignHorizontal": 1,                 "AlignVertical": 2,                 "Width": -2,                 "Height": -1               },               "components": [                 {                   "id": "Label1C_{count}",                   "type": "Label",                   "properties": {                     "FontSize": 10,                     "TextAlignment": 1,                     "Text": "{from}"                   }                 },                 {                   "id": "Label1CC_{count}",                   "type": "Label",                   "properties": {                     "FontBold": true,                     "FontSize": 15,                     "TextColor": -16752385,                     "FontTypeface": 7,                     "TextAlignment": 1,                     "Text": "arrow_forward"                   }                 },                 {                   "id": "Label1CCC_{count}",                   "type": "Label",                   "properties": {                     "FontSize": 10,                     "TextAlignment": 1,                     "Text": "{to}"                   }                 }               ]             },             {               "id": "Horizontal2C_{count}",               "type": "HorizontalArrangement",               "properties": {                 "AlignHorizontal": 1,                 "AlignVertical": 2,                 "Width": -2,                 "Height": -1               },               "components": [                 {                   "id": "ImageC_{count}",                   "type": "Image",                   "properties": {                     "Height": 20,                     "Width": 20,                     "Picture": "{formp}"                   }                 },                 {                   "id": "Label2C_{count}",                   "type": "Label",                   "properties": {                     "FontSize": 10,                     "TextAlignment": 1,                     "Text": "{forma}"                   }                 },                 {                   "id": "Label2CC_{count}",                   "type": "Label",                   "properties": {                     "FontSize": 15,                     "TextColor": -13508585,                     "FontTypeface": 7,                     "TextAlignment": 1,                     "Text": "sync_alt"                   }                 },                 {                   "id": "Label2CCC_{count}",                   "type": "Label",                   "properties": {                     "FontSize": 10,                     "TextAlignment": 1,                     "Text": "{toa}"                   }                 },                 {                   "id": "ImageCC_{count}",                   "type": "Image",                   "properties": {                     "Height": 20,                     "Width": 20,                     "Picture": "{top}"                   }                 }               ]             }           ]         },         {           "id": "Labelb_{count}",           "type": "Label",           "properties": {             "FontSize": 10,             "Heigh": -1,             "WidthPercent": 14,             "Text": "{user}",             "TextAlignment": 1           }         },         {           "id": "button{count}",           "type": "Button",           "properties": {             "Font Bold": true,             "FontSize": 11,             "Height": 40,             "WidthPercent": 22,             "TextAlignment": 1,             "TextColor": -1,             "Text": "{status}"           }         }       ]     }   ] }

Did You try to Change a Extension version ?

I’m not sure, but I think I went through this problem and solved it by changing the version.

Here :

It was @iamwsumit who helped me…

1 Like

It seems that the problem is not with the extension. In above duplicate id error, there is a number after HorizontalA that mean count key is replaced by the given parameter so I think he is using the right version.

And the problem seems in Firebase.GotValue where you are using loop for creating items with the same tag. That’s the problem most probably.

1 Like

I didn’t look at the blocks, I just mentioned that I had a problem with this error message and I solved it by changing the version​:+1:

1 Like

thanks @Rogerio_Rios but not worked changing versions…

1 Like

Try something like this

Thanks a lot, @dora_paz. got not a good result.

i’m giving ais…can you please check it.

In this ais, everything is my demo data…I have no problem with sharing it…

RewardBox_Screen2 (2).ais (18.4 KB)

thanks, @iamwsumit for your detailed reply.

I have not created any duplicate components with same id.

you can look into my ais …

Simply replace get tag with get number and see if it works

image

@dora_paz not worked…

This is the only change I did

This is the result in companion

in your example every thing is doubling … but in my case every thing is fine but only runtime error happens…

Add
bild

Also

The above blocks do the same as the below blocks

1 Like

thanks a lot, @Boban .

it’s working perfectly. and thanks again I learned something new with your help. :star_struck:

2 Likes

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