Hello,
I have a question regarding reading table information from within a repeater.
I have populated a table with 4 columns (a,b,x,y), each with various rows (4 in this example).
I have a repeater, inside which I would like to output dynamic form-paragraphs with the output of columns "x" and "y", separately. These outputs would be based on columns "a" & "b" which I would like to be able to adjust separately within each repetition.
{if: countdx
=1; trim=left}{Letters="a)"}{endif}
{if: countdx
=2; trim=left}{Letters="a),b)"}{endif}
{if: countdx
=3; trim=left}{Letters="a),b),c)"}{endif}
{if: countdx
=4; trim=left}{Letters="a),b),c),d)"}{endif}
{if: countdx
=5; trim=left}{Letters="a),b),c),d),e)"}{endif}
{if: countdx
=6; trim=left}{Letters="a),b),c),d),e),f)"}{endif}
Count: {formmenu: default=1; 2; 3; 4; 5; 6; name=countdx}
{dbselect: SELECT A, B, X, Y FROM Example WHERE A = @a AND B = @b; space=2j8mrZ2X7v9KckLeroLzgS; menu=no; multiple=no}
{repeat: for Letter in split(letters,",")}
{=letter} {formtext: name=A; default=}{formtext: name=B; default=}
{formparagraph: name=X; cols=49; rows=5}
{formparagraph: name=Y; cols=49; rows=5}
{endrepeat}
In the db-reader, which is outside the repeater, I have set 2 conditions, that A=a and that B=b, this does produce the desired outcome of having "x" and "y" produced in form-paragraphs that I can adjust.
- However, each repetition is the same (non-distinct). Changing variables "a" and/or "b" changes each repitition.
How would I be able to adjust in order to produce separate instances of "reads" from the same table?
- I have put the table (db-reader) within the repeater which works, however this slows my process down rather significantly and as such, I would like to keep the db-reader out of the repeater.
- I have also been able to produce separate instances of non-modifiable output using
map
andfilter
commands but this does not produce the desired results of having form-paragraphs I can adjust.
Thank you for the help in advance!