Question
Sun Life Financial
CA
Last activity: 30 Oct 2019 11:27 EDT
Can we use system settings in paragraph rule
Can we use system settings as a source for the link in Paragraph rule.
***Edited by Moderator Marissa to move from Pega Support Community to Pega Academy***
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Pegasystems Inc.
US
Hi @PhaneendraR,
You can use the below code snippet to directly reference a system setting in the paragraph rule:
<a href="<%=String.valueOf(pega_rules_utilities.getDataSystemSetting("Ruleset","DSSName"))%>">
Paste this code in source tab of the paragraph rule.
Pegasystems Inc.
IN
Hi @PhaneendraR,
Can you elaborate more on the "System Settings" you are referring to.
The link control can accept links those have the protocols "Http, https, ftp and news", Though it provide the "Other" as protocol, Let us say if we try to use "file" protocol then it may not work as per the security established between the browser that trying to access the local file and the operating system it is on.
So, in the system setting you are referring to, what is the protocol of the URL or the way you try to access the setting.
So, if you can try to explain the requirement you are trying to achieve then it would be much easier to imagine the problem to help you further.
Please feel free to reply if you have any further questions.
Thank you,
Regards, Cherb.
Sun Life Financial
CA
We are trying to access https protocols.
The https links are environment specific. For each environment(dev/test/prod) the url changes.
So, is there a way we can refer the link in the paragraph based on the level of environment working on.
Pegasystems Inc.
IN
Hi @PhaneendraR,
I get the problem you are looking for. You are trying to refer a DSS setting where the key remains same but value becomes updates with specific to that environment. If that works follow the below approach
1) Create a property that hold the URL from DSS value (Please make sure to run an activity to pull the value from DSS and updates the property with "property-set" method)
2) Create a section and configure the link control in the section
3) While configuring link control, use the "Property Reference" and refer the property that created in Step 1.
4) In the paragraph rule, click on "Insert Rule" Icon then select "Rule-HTML-Section" and refer the section created in Step 2
At runtime, the link will be rendered with a source link to the value of DSS. As you update the value in DSS key for each environment, the paragraph rule picks up the value from DSS value.
Hope this helps !.
Please feel free to add your questions if any.
Thank you,
Regards, Cherb.
Pegasystems Inc.
IN
Please read "DSS" as "System Settings" key value pairs
Accepted Solution
Pegasystems Inc.
US
Hi @PhaneendraR,
You can use the below code snippet to directly reference a system setting in the paragraph rule:
<a href="<%=String.valueOf(pega_rules_utilities.getDataSystemSetting("Ruleset","DSSName"))%>">
Paste this code in source tab of the paragraph rule.
-
Ashish Katiyar
Sun Life Financial
CA
thanks team for the support