Auto-generate progrimatically

Is there a way to set the next text in sequence programmatically?

Hi,

To set the sequence of auto-generated field values, please refer to this article.

Is there a way to use JS workflow to achieve this?