Cannot remove elements from a list

I cannot remove the thing(A Element) from List.

As shown on the figure, it shows the index is 0. Which means it cannot detect the thing in list.

Here's the aia.
Test.aia (206.3 KB)

to remove item from list you can do simple things like this



I have been tried this method in another project, same idea. But failed.
Here is the screenshot

I used the method SelectionIndex but failed.

After I try the project that you share, I'm very surprised that the "Elements Property" returns an empty list, and I think it's because you input the data from the Properties.
and there is something wrong with that part I hope the moderator will fix it so for now you can use a better and more stable method, this is the method

First, remove all the data from your listview properties.

Second, do like what I did here

Well, actually I did the same thing as you did, still failed :<

I seperate into two CloudDB, one to store ProductId as tag, the list of passage name (Elements) as value. Second one store ProductId_MainText as tag, passage content as value.

CloudDB1 for ProductID_MainText as tag and CloudDB5 for ProductID as tag

Salman, your method is not bad, but there are some few problems:

  • when you add a new element during runtime the code collapses.

  • don't remove the property of ListViewLayout. This is essential for displaying custom lists.

The best way is not to use a global variable. Use local variables that are disposable.

If this still does not work, send me your AIA file and I will debug it manually for you.

1 Like

Ehm, because I want to remove list item that is in the CloudDB, so I cannot use the local one, the variable may change if anyone uploaded a passage during the terminating process. It is my project, hope you can understand it :>
AA_Official (1).aia (446.8 KB)

Which screen is the error in? I see 9 screens.

There is something wrong with the logic of DevControl. When I first ran the app and checked for the product code "hello", the operation returns:

The operation Elements cannot accept the arguments: , [""]

There is something wrong with the data structuring of your CloudDBs. Could you please describe what you want to do with the CloudDBs, and what you intend to store?

You have to create a product detail first in the HelpScanMain page.

If you got error after actions, Reset the CloudDB in the DevControl Page

@Gordon_Lu you should try the aia that was shared previously :wink:

there's a bug :point_down: :point_down: :point_down:

I am not going to explain why, but you most do a copy of the list before you refresh the ListView, like so:
This works fine.
So, no bug, but the explanation could be MUCH better in the documentation.

1 Like

An insight as to what happens when an item is deleted by index number: