ID must be unique error (Dynamic Component)

Hello Experts :slight_smile: !

Can anyone help me with this “ID must be unique” error?

I have been trying to solve this since last week but I can’t find any id same. they’re all different but I am still getting this error!

I am using the “Dynamic Components extension made by Yusuf Cihan(GitHub - ysfchn/DynamicComponents-AI2: An App Inventor extension to add full support for creating any type of component at runtime, in your app.)”.

Here are my blocks. Please help me solve this error :sob:

Try to replace your ‘card1’ to card ; ‘hori1’ to hori and all like this.

I changed but still having the same error.

please any other idea?

1 Like

Don’t u use the same loop many times? What’s the trigger for the for each loop?

What do you mean by same loop?

I don’t understand. please help me :pleading_face:

This is not an issue with the extension. It seems that everyone who uses this loop experiences this error when it’s as simple as generating a random id instead of a specific one… Which would’ve been a quicker fix instead of trying to find an integer that’s causing this.

2 Likes

so what can I do exactly?

should I make the IDs to a random integer?

please help me I need to know about this

One thing you can do, is optimize the amount of blocks you use first. I’ve created a semi-optimized version based on your dataset (AIS included).

Outcome

Of course, you will have to change values based on whatever database you’re getting these comments from. By the way, I recommend following the Material Design guidelines to make your app cleaner. I also aligned the subject and time to the right so that not everything was clustered together and made some other slight design changes.


Dynamic Components: v2.2.2 unreleased [GitHub] |com.yusufcihan.DynamicComponents.aix (29.4 KB)

Screen:SemiOptimized.ais (8.8 KB)

Template:optimized.txt (5.0 KB)
This will appear as a .txt file, however it is formatted to be .json for the content, just copy and paste the content from inside, to the Scheme’s (block) template parameter if you don’t download the AIS!

5 Likes

Thanks. It works now!!
:smiling_face_with_three_hearts:

2 Likes

If u need solution for ur issue
0001-16201316264_20210130_181402_0000
Change those space 1 to space
If din’t work let it be aside
And say which action calls the for each number from 1 to length of list global DP give image of the whole block set

If u don’t know what I or

This mean then give AIA file

1 Like

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