0

Customizing employee codes using the substring method in Kissflow

Do you want to generate unique employee codes based on department names? The substring method makes this easy!

How it works

 

An HR manager, Sarah, uses an Employee Onboarding form in Kissflow to automatically generate unique employee codes for each new hire. She customizes the format of these codes by incorporating the department name using the substring() method.

By extracting the first few letters of the department name, she ensures each department has a distinct employee code prefix, making the codes easily identifiable and well-organized.

To set this up, Sarah uses the Prefix setting of the Sequence Number field and applies the following formula:

Employee_department.substring(0,3)
  • Employee_department is the field ID selected in the form (For example, Finance, Marketing, HR).

  • .substring(0,3) tells the system to extract characters starting from index 0 (the first character) up to index 3 (but not including the character at index 3).

So if the selected department is:

  • Finance β†’ substring(0,3) returns Fin
  • Marketing β†’ substring(0,3) returns Mar
  • HR returns HR (only two characters available)

Note

Indexing is zero-based, so substring(0,3) gives you the first three characters. If you mistakenly use substring(1,3), it will skip the first character and return only the second and third characters.

Using substring() this way helps:

  • Standardize employee codes across departments.

  • Improve traceability, as the prefix reflects the department.

  • Avoid manual errors when assigning codes.

Learn more about methods in text expressions here

With this simple approach, you can effortlessly generate customized codes that align with your specific requirements.

Content aside

  • 10 mths agoLast active
  • 114Views
  • 1 Following