Question & Answer
Question
Using Localization to Display Special Characters in the Process Portal
Answer
On Demand Consulting
Author: Matt Myers
Have you ever had a situation in which you wanted to give an artifact a very specific name to display in the Process Portal, a name that included characters like the "/" and other non-valid JavaScript identifiers? Well, if you try to set that as the name of some artifacts, you will get an error similar to the following:

The Process Designer will not allow you to include non-valid JavaScript identifiers in the name.
Fortunately there is a workaround that will allow you to include these type of characters. Let's take the example of exposing a Heritage Human Service in the Portal as a dashboard with the name "SPQR - Check/Settle DTC/Fed". The system will not allow you to give the Human Service this name by default (and the name is what appears in the Portal by default) but we can take advantage of the "Label" property that the Human Service has to get around this.
Step 1: Name your Human Service that you want to expose. Remember the name is not what is going to be exposed in the Portal so just name it something valid. After this create a new Localization Resource (under the "Setup" menu on the left). After you create it add a new Localization Key for the Default Locale (or whatever Locale you want to use) at the bottom of the menu:

Note that the "Add" button will not become active until you start typing something into the input box. I named mine "DashboardTitle" in the example above. Then select that Localization Key and go to the section on the right to enter a value for that key for whichever Locale you want to use (I have only the Default Locale in the example above but you may have more). Enter the value for that Locale in this section as pictured below:

Note that you have to hit 'Alt-Enter' to submit instead of the normal 'Enter'. After this save the Localization Resource and you will be ready to add it as a Label to your Human Service.
Step 2: Now that we have our Localization Resource setup go back to the Human Service you created earlier. In order to use the Localization Resource you created you will need to link it in the "Variables" tab as in the picture below:

Click the "Link Localization" button and select the Localization Resource that you just created. Next open the "Overview" tab as in the picture below:

The "Label" field will be blank by default. Click the "Select" button and navigate to the correct Key in the Localization Resource that you linked earlier. Select it and you are ready to go!
Make sure the Human Service is appropriately exposed (I exposed it as a "Dashboard" to the "All Users" group in the example above) then navigate to the Process Portal homepage. When you get there and click the dropdown to see the custom dashboards you will see the dashboard you created now has the same name that you defined in the Localization Resource Key and can now contain non-valid JavaScript identifiers (such as the "/" character) that it couldn't before.

Author: Matt Myers
Have you ever had a situation in which you wanted to give an artifact a very specific name to display in the Process Portal, a name that included characters like the "/" and other non-valid JavaScript identifiers? Well, if you try to set that as the name of some artifacts, you will get an error similar to the following:

The Process Designer will not allow you to include non-valid JavaScript identifiers in the name.
Fortunately there is a workaround that will allow you to include these type of characters. Let's take the example of exposing a Heritage Human Service in the Portal as a dashboard with the name "SPQR - Check/Settle DTC/Fed". The system will not allow you to give the Human Service this name by default (and the name is what appears in the Portal by default) but we can take advantage of the "Label" property that the Human Service has to get around this.
Step 1: Name your Human Service that you want to expose. Remember the name is not what is going to be exposed in the Portal so just name it something valid. After this create a new Localization Resource (under the "Setup" menu on the left). After you create it add a new Localization Key for the Default Locale (or whatever Locale you want to use) at the bottom of the menu:

Note that the "Add" button will not become active until you start typing something into the input box. I named mine "DashboardTitle" in the example above. Then select that Localization Key and go to the section on the right to enter a value for that key for whichever Locale you want to use (I have only the Default Locale in the example above but you may have more). Enter the value for that Locale in this section as pictured below:

Note that you have to hit 'Alt-Enter' to submit instead of the normal 'Enter'. After this save the Localization Resource and you will be ready to add it as a Label to your Human Service.
Step 2: Now that we have our Localization Resource setup go back to the Human Service you created earlier. In order to use the Localization Resource you created you will need to link it in the "Variables" tab as in the picture below:

Click the "Link Localization" button and select the Localization Resource that you just created. Next open the "Overview" tab as in the picture below:

The "Label" field will be blank by default. Click the "Select" button and navigate to the correct Key in the Localization Resource that you linked earlier. Select it and you are ready to go!
Make sure the Human Service is appropriately exposed (I exposed it as a "Dashboard" to the "All Users" group in the example above) then navigate to the Process Portal homepage. When you get there and click the dropdown to see the custom dashboards you will see the dashboard you created now has the same name that you defined in the Localization Resource Key and can now contain non-valid JavaScript identifiers (such as the "/" character) that it couldn't before.

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSQTW3","label":"IBM On Demand Consulting for Hybrid Cloud"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"","label":""}}]
Was this topic helpful?
Document Information
More support for:
IBM On Demand Consulting for Hybrid Cloud
Software version:
All Versions
Document number:
776357
Modified date:
16 March 2019
UID
ibm10776357
Manage My Notification Subscriptions