ID incrementation "BU2018-001" - InfoPath Dev
in

InfoPath Dev

ID incrementation "BU2018-001"

Last post 12-15-2017 07:58 AM by Hilary Stoupa. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 12-14-2017 02:29 AM

    ID incrementation "BU2018-001"

    Hello, I have a trouble with an auto-increment. We have BUdget, writen like this BU[YEAR]-[001]. When a user create a new budget, I need to take the max budget in the concerned year, and increment it. So I have a formula who look all the budget with this year, take the max ID, substring to have the three last digits, add one and it's ok ! My problem is : when i don't have any budget in the year, I have no return. And I can't make my +1. So, my question : how to increment a name like BU2018-002 to BU2018-003, with only one rule in infopath, and create BU2019-001 if there is no 2019. Sorry for my language, and thanks ! Hlz
  • 12-15-2017 07:58 AM In reply to

    Re: ID incrementation "BU2018-001"

    I think you'll have to add a condition to your rules to check and see if you have a budget for the year. That may be a condition that checks the returned rows for the current budget year (using a contains condition) - if there are none, you could set the field to -001. So - two rules, one that runs if you find the year and one that runs if you do not. :)

    Hilary Stoupa

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