Question

Removing special Characters

Hi Community,

We have a requirement from the client that application has to remove special characters (like +, -, =, @, %, and |)

in the application. data captured either UI or API (via Rest interaction with other application). I could think of below approaches

1. Database level update by trigger to remove special characters.

2. Pega triggers on each object in the data model.

3. Implementation at network interaction level. I have no idea what can be done to achieve at this level. any thoughts? does this address removing them from both UI and API interaction?

each one has its own advantages and disadvantages. However I wonder we could do something on property-set method level, when I was exploring how the validate rules are being enforced at the product level, could see that it is happening at proper-set level. also observed that developers has limited control (we can not override) on it.

any common place that we can use to implement it, with out spending time again on future data model or functionality changes.

any thoughts on this would be appreciated!

Regards

Pradeep

***Edited by Moderator Marissa to update platform capability tags****

Comments

Keep up to date on this post and subscribe to comments

Pega
April 22, 2019 - 7:08am

Hi

How much data you are expecting to convert? If the number is less, you can try using Pega activity.

You can, 1. Open the work items by obj-open-by-handle, check the properties, update them and resave.

However, this might not be good scalable approach if you have a high number of work items.

In that case, try updating it from DB end.

 

May 1, 2019 - 7:12am
Response to Santanu

Hi Santanu,

 

Thanks for your time on this. We have 200+ attributes in the application in entire data model.  We had taken the path of declare trigger during save operation. We were already doing some processing for audit, so squeezed this into existing code to process.

Regards

Pradeep

Pega
April 29, 2019 - 6:28am

Hi Pradeep,

If you do not want any special character then why don't you restrict users to enter them in UI itself.Regarding API,you can rectify them from DB end.

Is there any specific requirement of not having special characters?

 

Thanks,
Abhinav

May 2, 2019 - 7:56am
Response to Abhinav7

Hi Abhinav,

This requirement is to avoid possible security issue that may arise due to kind of functionality exists in the application. Also this application is external facing.

as mentioned in the above comments we have taken trigger approach to address this.

Thanks & Regards

Pradeep

May 2, 2019 - 5:25pm

rule-edit-input should be a better approach for UI rules as user also should know that the data which entered in UI is truncated from original text. Though it requires longer time to do this change as you have 200+ attributes but with trigger it will now take more time to save the record as it is doing extra processing of removing special character.