Auto Slip Number

A

Alex Anderson

Everyone,

I'm running Infopath 2007 on a SQL 2005 backend with no Sharepoint or forms
server. I would like to display my SLIP_ID (which is configured in SQL to
auto number so this number will be unique) on my form so when they submit the
form they can reference the slip number for reporting purposes. Could
someone give me some guidenance as to how I can achieve this?

Thank you
Alex Anderson
 
P

Paresh

Everyone,

I'm running Infopath 2007 on a SQL 2005 backend with no Sharepoint or forms
server. I would like to display my SLIP_ID (which is configured in SQL to
auto number so this number will be unique) on my form so when they submit the
form they can reference the slip number for reporting purposes. Could
someone give me some guidenance as to how I can achieve this?

Thank you
Alex Anderson

Hi Alex,

If I understand properly, I guess, SLIP_ID is the primary key in your
SQL database table which gets auto-incremented with every new record
and you want to display the next number in the form field, with the
user opens a new form for submitting a new record. If this is the
case, then you can query SQL database to get the maximum of SLIP_ID,
then add one to this and display this number in the form field.

Do let me know your views, if any.


Thanks,
Paresh
 
A

Alex Anderson

Paresh,

Yes, you are correct, that's exactly what I'm trying to do. When I query
the SQL database how exactly do I achieve this? I've tried Count, and Max
but I think off track.

Thank you
Alex Anderson
 
A

Alex Anderson

Paresh,

Ah...I fingered it out. I had to created a query data connection, and edit
the SQL commands to include the max() + 1 statement then on my main data
connection, add the SLIP_ID from my query fields, then (man I'm tired) add my
query field as the default value of that field. It works like a charm.
Thanks for your help!

Thank you
Alex Anderson
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top