Extending pyAddressForm for more countries

Hi there,

I noticed that in applications like Tell Us More, we use the out‑of‑the‑box address field to capture address information. I like how changing the country—for example, from the USA to Canada—automatically updates the form fields, such as showing Province instead of State.

Looking deeper, I saw that the view switches from pyAddressForm_USA to pyAddressForm_CAN when the country changes.

I tried to replicate this behavior by creating pyAddressForm_GTM (for Guatemala). However, Pega does not allow creating a view with a name starting with “py,” and it also doesn’t allow to save it in the Pega rulesets. Because of this, I wasn’t able to extend the functionality to countries beyond the existing list: AUS, CAN, DEU, DNK, FRA, GBR, IND, JPN, TUR, USA.

Is there a way to extend this capability, or would we need to rely on custom views for countries not included in the default list?

Thanks,

-Jose Navas

Yes, py,px,pz are reserved properties.

I think Custom Views is the possible solution for your scenario.

1 Like

you are correct, you should be creating py field here.

Issue is most likely you are trying to create the rule from scratch? Instructions say to take existing and save as.

This has worked for some time, so if you’re being blocked this is new (or you’re on a very old version of Pega), I would definitely be raising a support ticket with My Pega Support if that is the case.

2 Likes

Thanks Marc.

I tried what you suggested in Infinity 25.1.2, but it didn’t work for me.

I might raise a ticket as you suggested.

Thanks.

1 Like