I am making dynamic folios in which I get the maximum folio and add 1.
for example. I have this table
pagoid | folio 1 | A-0001 2 | A-0002