Expand my Community achievements bar.

SOLVED

Auto Number PO#

Avatar

Level 3

I'm trying to find a way to auto increment the PO# field. Or generate a unique number each time I open the form.

Any idea?

1 Accepted Solution

Avatar

Correct answer by
Level 10

You can make use of the TaskId (created for the starting task of your process) which is unique across applications.

One issue with this approach is: you cannot expect it to be sequential (but it will be incremental). I mean you will get 1 3 7 23 etc.

Otherwise create a table to save the current PO# and increment it by writing a web service. (This is same old fashion)

$Nith$

View solution in original post

11 Replies

Avatar

Correct answer by
Level 10

You can make use of the TaskId (created for the starting task of your process) which is unique across applications.

One issue with this approach is: you cannot expect it to be sequential (but it will be incremental). I mean you will get 1 3 7 23 etc.

Otherwise create a table to save the current PO# and increment it by writing a web service. (This is same old fashion)

$Nith$

Avatar

Level 3

Thanks $Nith$.

Forgive me but can I ask you to elaborate further by leading me step by step.

I would love to see both ways. Would you be kind enough to make the effort for me?

Avatar

Level 10

Sure..

Just one clarification:

Do you want the auto-generated PO# to be appear on the form? Or just to get saved in database?

-Nith

Avatar

Level 3

To appear on the form.

Thanks a million!

Avatar

Level 3

One more thing. The form is used on two machines

only. The form is printed and not submitted

.

the order # need not to be sequntial.

Thanks

Avatar

Level 10

Your input form variable created in your process usually refers to a Render Service (Default Render PDF).

You can tweak this render service to populate the task Id on the form.

Some guides..

1. Create a copy of your default render service

2. The render service will have a variable already created named 'taskId' which will be your PO# on your form

3. There is a variable named 'dataDoc' which will be merged with the form template; a step before the form bridge in injected into the form

Amend the taskId in the dataDoc variable and let the data merging happen after this step.

If my guide are not detailed, you can refer to the following link to pre-populate data on the form.

http://www.rolando-lopez.com/tech/livecycle-es/2008/03/prepopulate-form-with-logged-in-user-info-in-...

Nith

DISCLAIMER:

========================================================================

"This communication is intended only for the named recipient and others authorized to receive it.

It contains confidential or legally privileged information. If you are not the intended recipient, please notify us immediately, and note that any disclosure, copying, distribution or action you may take in reliance on this communication is strictly prohibited and may be unlawful. Unless indicated otherwise, this communication is not intended, nor should it be taken to create any legal and/or contractual relation or otherwise. Ministry of Finance (MOF) is neither liable for the proper and complete transmission of the communication, nor for any delay in its receipt.

Whilst MOF undertakes all reasonable efforts to screen outgoing e-mails for viruses, it cannot be held liable for any viruses transmitted by this e-mail."

Avatar

Level 3

I have decided to generate the PO# by Concat the PO Date and the Vendor.

Would I be imposing to ask you if you can create it for me?

I thought by using the Date2num to be stored in a field and the Concat function to be stored in another one. Then I can have The PO# = to the Concat field. The problem is I don't Know how to do it.

Avatar

Level 10

I am unable to understand your requirement fully. Anyways, I have created a simple form with which I understood so for.

Just see it and let me know your opinion.

Nith

Avatar

Level 3

THANK YOU !!!!!!!!!!!!!!!!!

The only thing is. I want the date in the PO to be "DDMMYYVendor". Without the "/".

PLEASE

Avatar

Level 10

You must be familiar with these small changes..

Anyhow, here you go..

Nith