Display the description of the dropdownlist list instead of alias in views (lotus notes)
I have a dropdownlist control in my form, this dropdownlist will accept multiple value.I enter four options and for each option I created an alias due to a long description of the values. My problem is when the document was saved, the values that are saved are the alias. So I am encountering a problem now, because in my view, I want to display the description and not the alias. How can I d开发者_如何学Pythonisplay the description instead the alias in my view, I am having a hard time to display it,since th field is a multiple values. I tried to use the formula @Explode but it will not display. Any ideas?
You can use @ReplaceSubstring
which works with lists too.
Edit:
An example column formula:
optionList := "One":"Two":"Three";
aliasList := "1":"2":"3";
@ReplaceSubstring(myFieldNameHere; aliasList; optionList)
Edit2:
@ReplaceSubstring
will return a list of the same size as the size of the field Reason
(in your case) - you don't need to use @Explode
.
With the values and aliases you have this would look like:
optionList := "due to lack of information":"document is not ready":"not in the shorlist":"due to other reason";
aliasList := "R1":"R2":"R3":"R4";
@ReplaceSubstring(Reason; aliasList; optionList)
The disadvantage of using aliases is that you have to "translate" the aliases back to their meaningful values every time you want to use the field and display information to the user - not only in views and forms, but also when exporting, etc.
On the other hand, the advantage of using aliases is that you can change the wording of any of the options if needed (without changing its meaning) at the cost of making the change in many places - views, forms, etc. (TeamStudio Configurator would help with that though), but without touching the documents.
It may be a good idea to replace the use more meaningful text for the aliases, for example:
aliasList := "noInfo":"notReady":"notShortlisted":"other";
otherwise you or the person who supports this may have to learn by heart what R1 through R4 mean.
精彩评论