cancel
Showing results for 
Search instead for 
Did you mean: 

Apply Masks in Extended field

former_member200925
Active Participant
0 Kudos

Hello experts,

I wonder if anyone knows a way to apply a pre-formatting extended fields with mask, for example "Postal Code" in Brazil has the format "00000-000" then I wonder if it is possible and how it is possible to apply the mask "NNNNN -DDD ".


Can someone help ?


Thanks

Accepted Solutions (1)

Accepted Solutions (1)

sunil1101
Advisor
Advisor
0 Kudos

Hi

You can write logic in your after modify, say you have a extend field in XBO with name PostalCode

in aftermodify of XBO write below logic

var temp = this.PostalCode.Substring(0,8); // postal code length is 8

var temp1 = temp.Substring(0,5);

var temp2 = temp.Substring(5,3);

var Masked = temp1 + "-" +temp2;

this.PostalCode = Masked;

Output:

enter value: 12345678
Masked Value: 12345-678

Regards

Sunil

Answers (0)