Question
Atos Syntel
IN
Last activity: 4 Oct 2018 13:54 EDT
Is there a way to show a value from the list of values available for a dropdown as a default value for it (dropdown)
Is there a way to show a value from a list of values(excluding the first value in the list) available for a dropdown as a default value for it (dropdown).
Lets say a dropdown is going to have a list of values a, b and c, Is there a way to show b as the default value for the dropdown rather than the first value in the list (a)
***Updated by Moderator: Marissa to remove the #helpme group tag. Apologies this should not have been an end-user option. Updated categories***
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Atos Syntel
IN
I found it !!!
we have use getPageValue() function to convert the embedded page (DataPage.pxResults(3)) to Clipboardproperty format (Java Type)and then give it as the parameter for the getPropertyValue() function along with the property that is required.
@(Pega-ProCom:RuleManagement).getPropertyValue(@(Pega-RULES:Property).getPageValue(DataPage.pxResults(3)), property)
BNZ
NZ
Hi,
we can use OOTB functions pxGetPropertyValue, getPropertyValue to show a default value if your source is Datapage/Clipboard page/Report Definition.
If you are using any one of the above sources and if you know the value/index of pagelist upfront before rendering the section where this dropdown is referenced, you can acheive it by using OOTB functions.
This might be a good starting point to work on to acheive your requirement. Although you may need to refer other funtions inside the pxGetPropertyValue/getPropertyValue functions to acheive your requirement.
let me know, if you need any help regarding this approach (or) if you figured a better approach (I can also learn).
Regards,
Naveen.
Atos Syntel
IN
Hi Naveen,
Like mentioned below(in bold) the pxResults embedded pages are going to have a property which is going to be shown in the list for the dropdown and the property from the 3rd pxResluts page should be displayed as the default value for the same dropdown.
Values for the dropdown: DataPage.pxResults().property
Default value: DataPage.pxResults(3).property
I see that getPropertyValue() requires two parameters 1. instance page 2. Propertypath
now what should give for instance page and property path, i tried few combinations but nothing worked.
Accepted Solution
Atos Syntel
IN
I found it !!!
we have use getPageValue() function to convert the embedded page (DataPage.pxResults(3)) to Clipboardproperty format (Java Type)and then give it as the parameter for the getPropertyValue() function along with the property that is required.
@(Pega-ProCom:RuleManagement).getPropertyValue(@(Pega-RULES:Property).getPageValue(DataPage.pxResults(3)), property)
Pegasystems Inc.
IN
Hi Dilipan,
In the dropdown control properties, you can specify the default value to be displayed.
Ex: I have created a property which has values a,b and c.
In the dropdown control, you can specify the default value and that will be displayed at runtime.
I hope this resolves your question.
Thank you.
-
Kasun Sarathchandra
Atos Syntel
IN
Hi Evita,
I cannot mention the value directly in the default value box coz I am loading the data from a data page whose values are going to change from time to time.
Like menitioned below the pxResults embedded pages are going to have a property which is going to be shown in the list for the dropdown and the property from the 3rd pxResluts page should be displayed as the default value for the same dropdown.
Values for the dropdown: DataPage.pxResults().property
Default value: DataPage.pxResults(3).property
Tata Consultancy Services
IN
I have a requirement similler to that..
I have a dropdown with values A,B,C and I have set a default value to B and got the above screen....
Now my query is:
If I have changed from "B" to "C" after that I have refreshed the screen then also its shows "C" only but not "B"
how to set default value as B after I have refreshed my UI 2nd time also...
Thanks
Krishna
Pegasystems Inc.
IN
Hi Krishna,
I see that you've also created a new post for the same query: Default Dropdown Value changes on Refresh of Screen
Great practice!