Sending Special character included string as a parameter issue

I have an issue when sending parameters to Open URL in Window. I need to pass a special character-included string as a parameter in action to an Activity.

Parameter value = “おざわ038検証用ファイルファイルゐゑxlsx.!$(),;{}#%&+@^`~_=-”

It gives 400 request error. Is there any way to pass this value as a parameter to activity?

@AshanN16674855

When passing parameters containing special characters as a parameter in an Open URL action in PEGA, you need to make sure that the parameter is URL encoded. URL encoding is a way to convert special characters into a format that can be safely transmitted over the internet.

To encode the parameter value, you can use the encodeURIComponent() JavaScript function. This function encodes all characters except for the following: alphabetic, decimal digits, - _ . ! ~ * ’ ( ) .

Here’s an example of how you can encode the parameter value in a PEGA Open URL action:

  1. Create a parameterized URL for your Open URL action, for example:

http://localhost:8080/myApp/myActivity?param1=<param1Value>

  1. In the parameter value, replace any special characters with their encoded value using the encodeURIComponent() function. For example:

var param1Value = encodeURIComponent("おざわ038検証用ファイルファイルゐゑxlsx.!$(),;{}#%&+@^~_=-");`

  1. Pass the encoded parameter value in your Open URL action:

http://localhost:8080/myApp/myActivity?param1= + param1Value

By encoding the parameter value in this way, you should be able to pass the special character-included string as a parameter to your Activity without encountering a 400 request error.