Question
Accenture Pte Ltd
SG
Last activity: 8 Feb 2018 8:42 EST
Default dropdown value
Hi!
1. How can I default a dropdown value, let's say A and B, and I want B to be the defaulted value?
2. Let's say 1 school has many English teacher and students.But each class will only be assigned 1 English teacher. How did I default 1 student from that class (eg Class ABC) to that 1 teacher (eg Teacher 123) who is the dropdown value? So I want Teacher 123 to be the default teacher name among the list of other teachers, whenever a student from class ABC login to their e-learning website.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
US
Hi Joyce,
Can you try to set the value in the Default value field in Dropdown settings as shown in the attachment.
Hope this helps you.
Regards
Mahesh
-
Violet Urazaeva Meriem Jeddi Arif Safarov Deepa Pattar Saranya devi Ramasamy
Accenture Pte Ltd
SG
Hi. I tried the method of that you have suggested. However, maybe because I not using the List Source-Type: As defined on Property, the solution did not work out for me.
Pegasystems Inc.
IN
In the pre processing of this UI, set the property value which is to be defaulted.
Lets say, in preprocessing activity/ data transform set the value of dropdown property to "Teacher 123", So by default when UI loads it shows teacher 123 and user can later change the value if required from drop down values.
Accenture Pte Ltd
SG
Hi there! I tried this method as well. But it didn't work out for me too.
Accenture Pte Ltd
SG
There is value on the clipboard however, it's not reflected on the screen. How can I resolve this?
Pegasystems Inc.
US
Try to perform refresh on the section and check whether the clipboard value is getting reflected in UI or not.
Pegasystems Inc.
IN
Can you once change the dropdown control to text input control and see if the value renders on UI. To test if the value is populated correctly.
If this works then there could be issue with dropdown control or config. Share the dropdown config screen shot.
conED
CA
We don't have to write a data transform. As Mahesh said, we can use default dropdown settings to set the default value. But be careful when you are setting the default value because if that default value is not present in the drop down value, then you will face a run time error.
Ncs Pte Ltd
SG
Try this in your dropdown default field.
@if(@String.contains(.studentClass,"Class ABC"),"Teacher 123","")
In this example we are check ".studentClass" contains "Class ABC" then set default to "Teacher 123" else ""(null).
Use you property or condition