Question
Tech Mahindra
AU
Last activity: 13 Sep 2017 11:10 EDT
Unable to call a function from a paragraph rule to get the dynamic system settings
Hi All,
I have a paragraph rule from where I need to call a function to get the DSS which has the hyperlink saved for that link. I am using the below code.
<a href="<%=Utilities.getDataSystemSetting("MyRS", "BuyACar")%>" target="_blank" title="Buy a Car">Buy a Car</a>
Problem is I have tried using multiple functions but it is unable to get the library when I try to save the paragraph rule.
Regards,
Subhajit
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Tech Mahindra Americas Inc
CA
Hello,
Please use below and let me know if this is working ..
"<%=String.valueOf(pega_rules_utilities.getDataSystemSetting("RULE_SET_NAME", "SETTINGS_NAME", "DEFAULT_VALUE"))%>"
Thank you!
Cognizant Technology Solutions
IN
I am trying the same in 5.5 Version and i am getting an error During CHeck In. Initial Save is happening Correctly. After the Initial Save If I try to open Souce Mode the ' " ' in the above expression is changed into '?' .. Any Idea?
Wells Fargo
IN
Hi Rahul,
Not Working for me. Used as below. DEFAULT_VALUE is mandatory or optional?
Text is getting displayed as it is.
Passwords cannot contain the word <%=String.valueOf(pega_rules_utilities.getDataSystemSetting("ResetPwd", "CurrSystemEnv"))%>
Thanks,
Charu :)
Pegasystems Inc.
US
Hi Charu,
We don't have the getDataSystemSetting method with 2 arguments as input as shown in the attachment. The syntax is as follows,
getDataSystemSetting(String, String, String) -> owningRuleSet, setting, defaultValue
So you need to provide the 3 inputs inorder to call this method, the last argument value can be any text which will be returned by this method if it cant find the provided DSS property in system.
Hope this helps you.
Regards
Mahesh
Wells Fargo
IN
Hi Mahesh,
Thanks for the info. I was able to make it work with 2 inputs. The problem was that i was not making changes to Source tab and there <> tag symbols were not getting interpreted properly.
Thanks,
Charu
Pegasystems Inc.
US
Yes your right, i noticed that the another getDataSystemString utility has 2 input strings i.e. owningRuleset and setting as specified in the attachment.
Wells Fargo
IN
Hi Rahul,
it worked. Thanks.
Charu
Pegasystems Inc.
US
You are welcome charu.
Areteans Technologies
AU
Else create a property which calls the function and refer the property in paragraph rule
Areteans Technologies
AU
Instead of modifying later in Source page of paragraph in future, refering the function in property through data transform rule will be preferrable