Automatic unique reference numbers for my forms - InfoPath Dev
in

InfoPath Dev

Automatic unique reference numbers for my forms

Last post 03-17-2008 11:42 AM by fechri. 14 replies.
Page 1 of 1 (15 items)
Sort Posts: Previous Next
  • 08-19-2005 12:20 AM

    • oguz
    • Not Ranked
    • Joined on 08-19-2005
    • Posts 18

    Automatic unique reference numbers for my forms

    I want to give automatic reference numbers for my forms. These reference numbers must be unique. This is like invoice ref. no or dispatch note ref. no. I save my form to a sharepoint library. In fact it likes want what MS SQL server do for auto ID.
  • 08-19-2005 01:09 AM In reply to

    Re: Automatic unique reference numbers for my forms

    By default sharepoint has an ID field for each form that gets created, but you cannot insert this ID into the form for the first time.

    If you want there are other ways to create unique id's.
    1. If you are using c# code you can use "Guid" as a reference, but this is a string which contains both characters and numbers.
    2. If you are using JScript you can use system time as the reference, in this you need to use upto milliseconds, so that collision is very minimal.

    Agni
    InfoPath Dev India
  • 08-19-2005 01:55 AM In reply to

    • oguz
    • Not Ranked
    • Joined on 08-19-2005
    • Posts 18

    Re: Automatic unique reference numbers for my forms

    I am using JScript and I try to make system time as reference but the reference number changes when someone opens it for editing. If c# can solve my problem how can I use it.
  • 08-19-2005 02:06 AM In reply to

    Re: Automatic unique reference numbers for my forms

    Hi agian,
    You can use date time to generate a pseudo-unique ID for forms.

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
  • 08-19-2005 04:44 AM In reply to

    • oguz
    • Not Ranked
    • Joined on 08-19-2005
    • Posts 18

    Re: Automatic unique reference numbers for my forms

    thanks
    I solve it by taking the ID field of the sharepoint.
  • 08-19-2005 10:56 AM In reply to

    Re: Automatic unique reference numbers for my forms

    That works too. Cool!

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
  • 09-14-2005 01:13 AM In reply to

    • Herve
    • Not Ranked
    • Joined on 09-14-2005
    • Posts 2

    Re: Automatic unique reference numbers for my forms

    Oguz,

    Could you explain how you did this ???

    By advance,
    Thanks !!
  • 09-14-2005 11:28 PM In reply to

    Re: Automatic unique reference numbers for my forms

    Hi Herve,
    I described this in the other post that you replied to. Let me know if it's not clear. Thanks!

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
  • 03-16-2008 09:23 PM In reply to

    • fechri
    • Not Ranked
    • Joined on 03-16-2008
    • Posts 6

    Re: Automatic unique reference numbers for my forms

    Hi,

    What if I want to take ID field (autonumber) from database access?

    Anyone, please help....

     

  • 03-17-2008 06:31 AM In reply to

    Re: Automatic unique reference numbers for my forms

    Are you submitting to Access? You can have a autonumber field but you will not see the number until after you have submitted once.

     You can create a table which is a list of numbers but the challenge is, if you have multiple form users, that you do not get duplicates.

  • 03-17-2008 07:22 AM In reply to

    • fechri
    • Not Ranked
    • Joined on 03-16-2008
    • Posts 6

    Re: Automatic unique reference numbers for my forms

    Hi clay.

     

    Thanks for the respond.

    I would like to be able to display that unique ID on my form, before it is saved in my access database.

    The logic :

    Users activate the the form.

    On load :

             Get the uniqe ID number from a database table

              mark that  specific ID as Used ID (so  other wont use it)

             Put that ID into the form

    User then fill out the form

    hit submit button and the record is updated

     any help wuld be appreciated.

     

     

             

     

  • 03-17-2008 08:11 AM In reply to

    Re: Automatic unique reference numbers for my forms

    This would require a dual submit.

    Open the form and immediately submit to get the next ID num and mark it taken.

    Then the user completes the record and submits the final data at the end.

    Some of the issues you will have is data validation, submitting an incomplete record initially.

    Also, without using web services, it has to be the same table so the number has to be an autoincrement on your main table.

  • 03-17-2008 09:19 AM In reply to

    • fechri
    • Not Ranked
    • Joined on 03-16-2008
    • Posts 6

    Re: Automatic unique reference numbers for my forms

    hi Clay.

    Thanks.

    But the first submit will move the record pointer to the next one. Am I Right?

    How do I refer the pointer back to the last one.

    What I am trying to do is to get a unique id  from a table and put it to my form and after the users fill out the form, the unique ID along with other fields will be saved in the same record pointer.

    I have 5 users filling out form at the same time.

     

  • 03-17-2008 09:43 AM In reply to

    Re: Automatic unique reference numbers for my forms

    No it would not advance the record on submit. you can control this in your form. What ever record you reference in your form will be what is submitted against.

    To do it right though, and what you describe, you would need to use web services. The default database connectivity has quite a few limitations, where as web services do not. In this case, query and submit to two seperate tables.

    If you would like to see an example of a couple forms that do this, send me an email and I could show you.

  • 03-17-2008 11:42 AM In reply to

    • fechri
    • Not Ranked
    • Joined on 03-16-2008
    • Posts 6

    Re: Automatic unique reference numbers for my forms

    Thanks for the reply clay.

    I see what you mean.

    On load form,

        retrieve ID from  first table, put it in the buffer field, then increment the value of the first table by one.

       users then  fill out form to second table (main data source)

    submit.

     

    the problem is , I dont have the web service available. Trying to find help using this forum is somehow a lot easier than to contact the it department .

    I was wondering if you know how to change value of the secondary data source.

    or

    passing parameter between form

     thanks

Page 1 of 1 (15 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.