Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Case / Count Calc based on value

Featured Replies

Good morning all,

 

I have to do an import of data into FMP, but the field we are 'matching' to is configured differently than FMP.

 

EmployeeID from the CSV file we are importing is a 6 character field, where the employee ID itself is actually 4 or 5 characters and any remaining empty values are prefixed with a 0.  Such as a 4 digit employee ID is shown as 001234 and a 5 digit employee ID is shown as 012345.

 

In our FMP database, the EmployeID is shown without any prefixed 0's.  So it is 1234 or 12345.

 

When importing, these don't match up.

 

I'd like to make a calculation in FMP called EmployeeIDConverted where if the EmployeeID in FMP is a 4 digits, it displays as 00xxxx (prefixed with two 0's) and if 5 digits, it displays as 0xxxxx (prefixed with one 0), so I can successfully match records for import.  I'm not exactly sure how to do this (tried a few ways, but didn't work).

 

Thank you in advance!

Right ( "000000" & employeeID ; 6 )

 

Make sure to set the result type to text.

  • Author

Right ( "000000" & employeeID ; 6 )

 

Make sure to set the result type to text.

 

Thank you!! :)

Have a look at the SerialIncrement() function.

  • Author

Have a look at the SerialIncrement() function.

Would that be better to use?  I'm not very familiar with that function.

Would that be better to use?

 

IMHO, yes, for a number of reasons (none of them very significant, though). Still, it is the function designed specifically for the stated purpose. There is also a difference in how the 1,000,000th employee will be handled.

  • Author

IMHO, yes, for a number of reasons (none of them very significant, though). Still, it is the function designed specifically for the stated purpose. There is also a difference in how the 1,000,000th employee will be handled.

 

Ah ok.  Could you recommend what I should put for the calculation?  I'm not sure how to use the SerialIncrement() function.

SerialIncrement ( "000000" ; EmployeeID )

BTW, earlier you said:

 

In our FMP database, the EmployeID is shown without any prefixed 0's.  So it is 1234 or 12345.

 

 

Why don't you simply strip the leading zeros from the imported values, instead of padding yours?

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.