I'm converting a batch of shp from one MCD to another. I can easily map 80% of the fields without any problem. But for the output MCD I need to generate a new primary key based on a concatenation of a string and a three digit increment. I've tried modifying the value (in the feature type dialog box) using the text editor, and 'string_'@Count() - this sort of works it produces 'string_1' etc but i need 'string_001' etc. Also, I already use Count() in another field which seems to confuse FME - This is probably very easy, but I'm new FME...
Solved
Generating a new primary key based on a concatenation of a string and a three digit increment
Best answer by redgeographics
You can add a Format function to it, like this:
string_@Format(%03d,@Count())This will left-pad the count with zeroes to 3 characters.
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.
Login to the community
No account yet? Create an account
An FME Account is required to contribute
LoginEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.

