Different Invoice Number for different products - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Different Invoice Number for different products

Last post 03-26-2019 11:22 AM by Fatihteke. 37 replies.
Page 1 of 3 (38 items) 1 2 3 Next >
Sort Posts: Previous Next
  • 02-23-2019 12:53 PM

    Different Invoice Number for different products

    Hello everyone, I have 10 invoice type. And I want to create automatically invoice number for each type. When i create new invoice, i choice invoice type "01" and auto populate last (max) number for type "01". But if i choice type "02" than autopopulate last (max) number for type "02". My idea is create 10 different list for each invoice number and then when i create new form dropdown will select type number it will automatically populate last (max) number. My question is if i do that when i need new invoice type i have to create new rule. And i think so it will be so hard. IS there any easy way? Best Regards.
    Filed under: ,
  • 02-25-2019 07:54 AM In reply to

    Re: Different Invoice Number for different products

    I think I'd just promote the invoice type to the library. Add a data connection to the library - don't run the query on form open. Add rules to your submit rules - to get the invoice numbers just for your type, set the query field in the data connection to the selected type, then run the query. If there are no rows returned, you know this is the first one of its type - otherwise you can use your max(id) logic - since you'll only have rows for the selected type, you won't need any XPath filters. Remember, there is a slight chance if two people submit the same type at the same time that you could get a duplicate number - slim, but possible (and the work arounds for that can get kind of complicated, so it may be an OK risk for you to take, just wanted to make sure you were aware).
    Hilary Stoupa

  • 02-25-2019 10:18 AM In reply to

    Re: Different Invoice Number for different products

    Hello Hilary, Thank you for your response. But i forgot someting. I cannot add more than one list in one dropdown. Thats why i use them in only one list. it will be more complicate :(
  • 02-25-2019 12:45 PM In reply to

    Re: Different Invoice Number for different products

    Is this a list form? Or a form published to a library? I'm a little confused by your description - when you are getting the max for creating the invoice number, where are you getting it from?
    Hilary Stoupa

  • 02-26-2019 09:32 AM In reply to

    Re: Different Invoice Number for different products

    I am sorry for not enough information. Infopath form for create proforma invoice. But invoice number is come from list. the problem is there is no only one invoice number. there are 5 kind of products (maybe it will be more later) and there are 5 different invoice number. each products have their invoice number. for example product 01 and invoice number is 123, product 02 invoice number is 50. When i create new proforma invoice for 01 product it must give a number 124, but if i create a new invoice number for product 02 it must give a number 51. I am realy confused. I download qrules but unfortunately i couldn't understand how i use it :( Best Regards.
  • 02-26-2019 09:43 AM In reply to

    Re: Different Invoice Number for different products

    So - my question is, why do the invoice numbers need to come from a list? Do your filled out InfoPath forms get submitted to a form library?
    Hilary Stoupa

  • 02-26-2019 10:09 AM In reply to

    Re: Different Invoice Number for different products

    I am sorry, I couldn't imagine that.(i mean i cannot understand) what if we create new product will automatically add from library?
  • 02-26-2019 10:53 AM In reply to

    Re: Different Invoice Number for different products

    I'll try to post a sample later today (since you won't be able to connect to my SharePoint site, I'll dummy up some data sources) and see if I can better describe what I'm getting at. I think your products should stay in their own list, for sure - but I think you could increment the actual invoice number from the library the forms submit to.
    Hilary Stoupa

  • 02-26-2019 05:02 PM In reply to

    Re: Different Invoice Number for different products

    Didn't get a chance today, I'm sorry - I should be able to tomorrow. :)
    Hilary Stoupa

  • 02-27-2019 05:09 PM In reply to

    Re: Different Invoice Number for different products

    I'm so sorry - still haven't had time to try to create a sample. Let me try to outline what I think you should do. Have a list, like you currently do, that has the type of invoice. Your user selects that from a dropdown in the form they are filling out. When you publish your form be sure to promote that field to the library. Add a data connection to the library to your form - be sure to include the invoice number (promoted from the form) and the type. In the form, when the user submits, set the query field in that data connection to the selected type of invoice. Query the data connection. If no rows are returned, there are no forms filled out for that invoice type, and you can set the invoice number to 1. Otherwise get the max of the invoice numbers in the library for that type, add one and set the invoice number to that.
    Hilary Stoupa

  • 03-03-2019 10:36 AM In reply to

    Re: Different Invoice Number for different products

    Hello Hilary, I couldn't do that :( i think so i am not good for to this. I try but i couldn't. I think like this but this is very very long and bad way: I create 10 different list and 10 different rules (for each product) and user open the form there will be text box. If user write there "01" than query for list one. and get Max. If user write there "02" than query for list second and get max. I know its not easy and best way. Because if user want to create product 11 , I have to create new rule for this :(
  • 03-04-2019 07:34 AM In reply to

    Re: Different Invoice Number for different products

    If this form isn't already in production, you could change to using a single list - you are right, if you are going to use a separate list for each type, you are just going to have to create new rules when you have a new type.
    Hilary Stoupa

  • 03-04-2019 11:06 AM In reply to

    Re: Different Invoice Number for different products

    Hello Hilary, I create an example. You cannot connect the data but i think you can understand my rules. My rules working and get maximum invoice number for each products. But I have to plus invoice number and create new item for list and save it. ( i can plus invoice number with rule) But how can save new invoice number to my list? :( Thank you for your help. Best Regards.
  • 03-06-2019 08:02 AM In reply to

    Re: Different Invoice Number for different products

    I typed up steps to outline what I have been trying to explain in your sample form. I really don't know of another way to explain this - I'm sorry that I've not been clear enough for you to understand.
    Hilary Stoupa

  • 03-11-2019 11:28 AM In reply to

    Re: Different Invoice Number for different products

    Hello Hilary, I am sorry I couldn't explain very well. I attached my example lists. every product have their number. And When i create a new invoice it will be automatically get the last invoice number that belongs product number. For example if i create a new invoice form for "pants" I choice "product number" 5 than press "get invoice number" button, It will look the last invoice number for "pants" and its 110 now, form automatically create 111. If i save the invoice form the form automatically save invoice number for line 5 in "List 2" to 111. If i create new invoice for "Hat" it will check the "List 2" than automatically get "13" for new invoice number. If i save than "list 2 will update" I hope i can explain my idea. PS: I am sorry for grammar mistakes.
Page 1 of 3 (38 items) 1 2 3 Next >
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.