Set next table arrangment to visible to true

I am trying to get a table arrangement to become visible after a list picker in the previous arrangement has had a selection returned. Below is the block I am currently using for this.

This works as it should. However, I would like to make this a lot easier on myself when adding more table arrangements. I am going to add quite a few more and don't relish the idea of coming back to each block and changing the "Item_Container_x" on each set of blocks. Is there a way of using a procedure or an "any list picker" block to automate this?

I hope this makes sense. If not I'm happy to provide more information or more screenshots of what I'm doing.

(I realized I added this post to the wrong category and moved it)

I don't know what you want exactly but you have the "Any component" blocks

1 Like

Right. I have recently discovered those and that has immensely helped me in simplifying my code. Since posting this question I have simplified my blocks as shown below.

What I am trying to do is eliminate the need for the first block so that every time I add a new container I don't have to go to the blocks and change the "Item_Container_2" to the next number of container. Below is a screenshot of my design page for this app.


The first table arrangement contains the list picker and various other components. It is the only one set to visible on initialization of the app. After making a selection on the first list picker I want the next table arrangement to turn to visible so it can then be used. This is easy to do with the blocks as I have set up when it's only a few arrangements. It gets tedious and redundant when I have copied this block 100 times.

This usually waves a flag for Power Users, which mean you are not using DRY (don't repeat yourself) block programming?


Looks like you are going to need dynamic components ?


Also, although they may work OK for you, Table Arrangements are known to be buggy in practice, you may be better just using vertical and horizontal arrangements to format your display layout.

An axiom for you:

Copy data,
Not code

I havent had a chance yet to check out let alone understand the functionality of the dynamic components extension, but thanks for the feedback.

This usually waves a flag for Power Users, which mean you are not using DRY (don't repeat yourself) block programming?

This is exactly why I'm asking this question. Because I'm quite certain that this is not the correct way to do this. To be clear, I have not actually copied this 100 times yet. I want to avoid doing that.

I have built several apps with app inventor and love it, and am always looking for a way to improve my skills instead of using the "brute force" method.

Thanks for the feedback. How would you apply that axiom in this instance?

Use multiple Pickers, each exposed at a different level of detail.

Expose input facilities only at the deepest level of detail, for only a single datum.

I'm back to working on this again. One thing I don't completely understand is how you create a horizontal arrangement with the dynamic components extension and then target that arrangement for adding the components I need to it. And then have this repeatable as many times as needed.
Do you have to nest procedures to somehow call the name of the newly created arrangement and then use that value to set the target arrangement name to the new arrangement? If so, can you provide a quick example of how this would work?

Is there a tutorial for this that someone, who isn't a wizard like you all, can understand?


1 Like

I'm getting it figured out on adding components. Now I'm trying to figure out how I would have a label, that is created by the dynamic block, change background color to yellow when the checkbox in that arrangement is checked and then change back again when not checked. I know how to do this in a normal situation, just not sure how to target a dynamically created component.

I figured this all out. I have shared my blocks below in case someone else is struggling with this. I just recycled the basics of this to get all my other fields to update.

Thanks, TIMAI2 and ABG for pointing me in the right direction. I have learned a lot about how to simplify my apps with this information.

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