How to check if dynamic object exists

The lists have a method for testing if a “thing” IS A list or not (the same goes for dictionaries).

The dynamic objects (Card View, Label etc.) have “Delete” methods, but so far I haven’t found a way to check if a dynamic object exists or not. Example:

  • I’ve created a Card View (holding other dynamic child objects)
  • later I’ve deleted it (and the child objects as well)
  • more later at some point I’d like to check if my Card View exists or not

When I try to delete an already deleted dynamic object , run-time error is thrown. When I try to compare the “thing” gotten by grabbing my deleted Card View via its ID, I get other run-time error saying that “nothing” cannot be compared (I don’t know if exists NULL comparison in this language).

Of course there is possible to add a global variable to track the status of the root object of my dynamic object tree, but maybe I’m missing a better way to do that.

Ella

if you are Using yusufcihan Dynamic Component Extension Then -

With This Block You Can Verify All Your Dynamic Components Present With Their ID’s
component_method (1)

2 Likes

Thank you for the information. At present I’m learning to use the core product.

1 Like

How can i check a card view exist or not. If I am not using any extension. I am using dynamic card view.

Example:

  • I have let’s say a CreateMyObjects method for creating a specific set of dynamic objects
  • I have let’s say a DeleteMyObjects method for deleting one by one the members of the exact same set of dynamic objects

I’m adding a global variable MyObjectsStatus initialized with boolean false, and then:

  • at the end of the CreateMyObjects method I’m setting MyObjectsStatus to boolean true
  • at the begininng of the DeleteMyObjects method I’m setting MyObjectsStatus to boolean false

Now I can check the MyObjectsStatus global variable where needed.

This is not a good programming practice, but it works in my use case (pagination of long image list).

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

Continuing questions after closed thread:

I have tried to use Call Used IDs block in “IF Then” Statement and it is unsuccessfully returning my desired value corresponding to weather component exists. I have uploaded my attempts. The values return false consistently except for contains text block it returns true properly only IF the last item added to Dynamic Components ID happens to be the one I’m referring to but not if it is an component prior to the last one added <image blocks(1)>



image