Computed For Display Puzzle

Sorry in advance if this is not very clear.

I have a question about a dialogbox/layout region.

I have an editable field, a computed field, and a computed for display field in a dialog box.

When I select a choice in the editable field, if there is a matching value in my lookup, the computed field will hold it. If there isn’t a matching value, I have a hotspot/button to do a lookup for the value. The edible field has the checkboxes Refresh on keyword and Refresh on document refresh checked.

The value within my computed field should be displayed in the CFD field. However, the CFD field remains blank until I click on the choice again, so no matter what I select the CFD field contains the wrong value.

I’ve tried to add @Command([ViewRefreshFields]) to my computed field, but I receive an error:

@Commands and other UI Functions are not allowed in this context.

Any ideas why there is a delay or how I can issue a refresh?

Subject: RE: Computed For Display Puzzle

I’ll answer your question, but first I have to say I don’t understand why you would have a CFD that displays the same value as your computed field. Why not just display the computed field there?

I believe your problem has to do with the fact that by default, field formulas are calculated from top down and left to right on the form. The CFD field’s formula is evaluated before the Computed field, so it works off of the old value.

If it’s not convenient to rearrange the sequence of the fields, you could set the CFD fields compute after validation option.