Hello,
I'm working with a Purchase Order entity from my CDS that is conected to my app, that entity has previuos data created by microsoft and their AutoNumber format was "PO001". When I started to add data to it I saw the AutoNumber format change to "Pur000001".
I was wondering if there is a way to control or manipulate this format ?
Also, I wanted to match this AutoNumber in the existing records to the codification we already have and let the AutoNumber keep the sequence for the new orders.
Thank you.
Solved! Go to Solution.
Hi @Lucas
In my personal opinion there are two things in PowerApps that should be used only if very little customisation is required: forms and standard entities. This is because as soon as you want to do any real customisation, then it is much easier to start from zero.
In your case, I would create a custom entity. You can then set the prefix of the PrimaryId to be PO, altough you will still see 6 digits after the prefix, so "PO000001". You can always show the shortened version in PowerApps by chopping out three zeros with a Substitute, something like this:
Substitute(ThisItem.PrimaryId, "000", "")
You can use your existing codification by opening the entity in Excel and copy-pasting the exisintg codification (but with 6 digits) in the PrimaryId column. I have tested in the past and it worked.
Hi @Lucas
In my personal opinion there are two things in PowerApps that should be used only if very little customisation is required: forms and standard entities. This is because as soon as you want to do any real customisation, then it is much easier to start from zero.
In your case, I would create a custom entity. You can then set the prefix of the PrimaryId to be PO, altough you will still see 6 digits after the prefix, so "PO000001". You can always show the shortened version in PowerApps by chopping out three zeros with a Substitute, something like this:
Substitute(ThisItem.PrimaryId, "000", "")
You can use your existing codification by opening the entity in Excel and copy-pasting the exisintg codification (but with 6 digits) in the PrimaryId column. I have tested in the past and it worked.
Hi @Meneghino,
Thank you for the information on the prefix, also, the substitue function is a great alternative to shortened the 6 digits number.
Substitute does not work as it can be implemented for Text field only, but not for INT.
Hi @ENE
The PrimaryId field in CDS is a text field, I believe.
User | Count |
---|---|
133 | |
132 | |
97 | |
75 | |
74 |
User | Count |
---|---|
206 | |
196 | |
70 | |
60 | |
52 |