Expand my Community achievements bar.

Unique identifier in Acrobat formset

Avatar

Level 1

Hello to all.  I need to generate a unique id on a multiple page form, so that the pages can be identified as one set.  I tried using date and time, but the time function requires a link to a server to generate time, which does not work if the form is then saved and accessed offline from that server.  So, I need just a unique number in the footer or header that will identify the generated set of pages as a one document when the form is filled in.  Thanks in anticipation.

Colinhill

1 Reply

Avatar

Former Community Member

Date-time does not need a server connection. It uses the host system time. There are numerous ways to accomplish this depending upon the requirements for uniqueness. The first example uses date and time. The second example uses the JavaScript random method which creates a pseudo random number.

// form1.#pageSet[0].Page1.id_1::initialize - (FormCalc, client)

$.rawValue = Concat(Num2Date(Date(), "MMDD"), Num2Time(Time(), "HHMMSS"));

// form1.#pageSet[0].Page1.id_2::initialize - (JavaScript, client)

this.rawValue = Math.round(Math.random() * (10000000 - 1) + 1);

Steve