SantasLittleHelper
Board Regular
- Joined
- Nov 25, 2016
- Messages
- 77
I have a field with the expression below: (I've made the fields generic so they are easier to understand)
This table hopefully summarises what is currently happening:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Field1[/TD]
[TD]IDCode[/TD]
[TD]IDCounty[/TD]
[TD]IDNumber[/TD]
[TD]Calculated Field[/TD]
[TD]What I want[/TD]
[/TR]
[TR]
[TD]Example Text[/TD]
[TD]AB[/TD]
[TD]Cambridgeshire[/TD]
[TD](Null)[/TD]
[TD]ABCambridgeshire[/TD]
[TD]ABCambridgeshire[/TD]
[/TR]
[TR]
[TD]Different Text[/TD]
[TD]GH[/TD]
[TD](Null)[/TD]
[TD]00023[/TD]
[TD]GH23[/TD]
[TD]GH00023[/TD]
[/TR]
[TR]
[TD]Different Text[/TD]
[TD]PI[/TD]
[TD](Null)[/TD]
[TD]00467[/TD]
[TD]PI467[/TD]
[TD]PI00467[/TD]
[/TR]
</tbody>[/TABLE]
Is there a way to format the Calculated field so that if the ID Number is used it, keeps any leading zeros?
Code:
IIF(Field1='Example Text',[IDCode] & [IDCounty],[IDCode] & [IDNumber])
This table hopefully summarises what is currently happening:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Field1[/TD]
[TD]IDCode[/TD]
[TD]IDCounty[/TD]
[TD]IDNumber[/TD]
[TD]Calculated Field[/TD]
[TD]What I want[/TD]
[/TR]
[TR]
[TD]Example Text[/TD]
[TD]AB[/TD]
[TD]Cambridgeshire[/TD]
[TD](Null)[/TD]
[TD]ABCambridgeshire[/TD]
[TD]ABCambridgeshire[/TD]
[/TR]
[TR]
[TD]Different Text[/TD]
[TD]GH[/TD]
[TD](Null)[/TD]
[TD]00023[/TD]
[TD]GH23[/TD]
[TD]GH00023[/TD]
[/TR]
[TR]
[TD]Different Text[/TD]
[TD]PI[/TD]
[TD](Null)[/TD]
[TD]00467[/TD]
[TD]PI467[/TD]
[TD]PI00467[/TD]
[/TR]
</tbody>[/TABLE]
Is there a way to format the Calculated field so that if the ID Number is used it, keeps any leading zeros?