Background: the following Manipulate works as expected
db := {{1, 10, 11}, {2, 20, 21}, {3, 5, 11}, {4, 15, 11}, {5, 8, 21}};
Manipulate[
Manipulate[ {a, 1, db[[x, 2]]}, {a, 1, db[[x, 2]]}],
{{x, 1}, 1, 5, 1}]
Now I want to make the inner-Manipulate more flexible... I tried this:
Manipulate[
Manipulate[s, {a, 1, db[[x, 2]]}] /. s -> {a, 1, db[[x, 2]]},
{{x, 1}, 1, 5, 1}]
Where s is supposed to be entirely variable based on some value in the outer-Manipulate, but it fails.
Question: I want to programmatically build a(n inner-)Manipulate from values selected in an (outer-)Manipulate. Is this possible, if so how?
UPDATE: I modified Piilsy's answer so that it works as follows:
Manipulate[
Manipulate[
Column[Table[{##}[[i, 1, 1]], {i, 1, Length[{##}]}]], ##]
& @@Table[{{x[i], 0.5}, 0, 1}, {i, 1, n}],
{n, Range[6]}]
Question:Can this code be enhanced, i.e. made clearer?
{a, 1, db[[x, 2]]}
literally won't work for your application? $\endgroup$