solution to solve by assigning indexID?

J

jeline yong

hi,

with my understanding that infopath able to update their data entry into the
SQL by submit. How about update the table primary key by auto assign the new
unique ID?
Example: User mostly will not enter the IndexID so the form suppose to
automatic generate the IndexID. Infopath able to do this? Kindly give me the
solution. always TQ.
 
A

Adam Harding

Hi

Does the index ID need to appear at the start of the form or can it appear
after the submit button is pressed?

Cheers
 
R

Rowland Long

Jeline,
In the default value box in the textbox properties dialog box insert the
following following function code:

concat(substring(now(), 6, 2), substring(now(), 9, 2), substring(now(), 3,
2), substring(now(), 12, 2), substring(now(), 15, 2), substring(now(), 18,
2))

This will give you the date concatenated to the time which will be unique in
every case, i.e. 021706111512
Hope this helps,
Rowland
 
A

Adam Harding

Hello again

SQL or Access generate a unique reference number for every line of data that
is submitted.

On your submit button run a rule that says submit the form to a database,
then display a text box showing the URN or send them a mail with the URN that
the database has just assigned.

The complete solution.

Adam
 
Top