Lotus Notes - Formula: Displaying dialog list choice in front end

1.7k views Asked by At

I've already asked about the column value display, for which in a dialog list selection, there will be 3 columns and when the user select one, the alias in the view selection would be reflected in the dialog list field. But my problem now is that the value stores in the back end, so user cannot see it visually while editing the form. Is there anyway possible that the value would display instantly after selection? I've tried making a "Computed for display" field, but that makes it pretty much redundant.

Here's my column value code: SiteNum + " " + Site + " " + State + " | " + SiteNum And my dialog list formula: @Unique(@DbColumn("" : "NoCache"; @DbName; "SiteLookupView"; 4))

Thanks!

2

There are 2 answers

1
Tode On BEST ANSWER

If you need both, the "visible" value and the "alias" then I usually do it like that:

  1. Field, Multivalue, Name "SelectionList", Hidden from User, Formula:

    @Unique(@DbColumn("" : "NoCache"; @DbName; "SiteLookupView"; 4))

  2. Field: DialogList, Name "Selection" (or whatever fits best), "Use Formula", and as Formula simply:

    SelectionList

  3. Field: Text, Name: SelectionReadable, Computed (if needed in a view) or Computed for Display (if needed only in Read- Mode), Formula:

    @Replace( Selection; @Word( SelectionList ; "|" ; 2 ) ; @Word( SelectionList ; "|" ; 1 )

Now you can e.g. hide "Selection" when in Read- Mode and "SelectionReadable" when in Edit- Mode and if SelectionReadable is not Computed For Display then you can even use it in Views.

Is this redundant? Yes it is, but that's the way you do it in Notes...

1
Ken Pespisa On

You can create a Computed for display field that has a value set to the item name you want to display. If it isn't showing up, you can set the option to "refresh fields on keyword change"

If you are looking to show a different value based on the selected item, you could use the @DbLookup formula in your computed for display field to get another field from a view, for example.