Concatenation using an active directory (id) field, current user and autonumbering - InfoPath Dev
in

InfoPath Dev

Concatenation using an active directory (id) field, current user and autonumbering

Last post 06-01-2011 05:52 AM by Skarn. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 05-25-2011 10:13 AM

    Concatenation using an active directory (id) field, current user and autonumbering

    I need help creating a unique concatenated ID field for a grievance application. HR policy only allows an employee 2 appeals in a year, but they still want to capture all applications submitted. I want to keep track of the number of appeals each employee submits in a given year over the lifetime of the employees employment. 

    My desired concatenation to use as the form ID would be employeeID-YEAR-## 

    • concat(TXTempCDSID,"-", TXTappDATE,"-", strFilename)

    How can pull theyear [YYYY] from the TXTappDATE field and then autonumber with a whole number?

    Every employee has a unique employeeID, the appeal application ID field should show HR the exact number of grievances (eligible or not) an employee submits whether they are eligible or not.

  • 06-01-2011 05:52 AM In reply to

    • Skarn
    • Top 50 Contributor
      Male
    • Joined on 04-20-2008
    • Australia
    • Posts 198

    Re: Concatenation using an active directory (id) field, current user and autonumbering

    Date fields in Infopath forms store their text as YYYY-MM-DD so you can use substring function to strip the first 4 characters.

     As for the incrementing id to represent the count of previous appeals, unless you have a way of retrieving previous tally submissions made via the form (maybe via a secondary data connect? are you using SQL server?) the form has no way of knowing this figure and can't increment it accordingly.

     If all the appeals are stored via the form and every appeal is appended to a pre-existing form with the appeal data in it (ie you have a repeating group structure) then you could use the count function on the group each time a new repeating section is added.

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