How to set value of Option


I have a Field (Inv:What) declared in my DCT as Option.

On my screen I have the three options:

  1. Invoice with a Value of ‘I’ (Capital i)
  2. Delete with a Value of ‘D’
  3. Cancel with a Value of ‘C’

When my window opens I want to assign and populate a Value to Inv:What depending on some options.
Then it must show the correct Option as filled in on the window.

I have tried: Inv:What = ‘I’

It never gets the value.

I would appreciate any help please.


Johan de Klerk

If you’re using ABC, you can put your code in the Browse.PrimeRecord method. If, for some reason, it must be in the update form itself, then use the ThisWindow.PrimeFields method. Or use a dictionary trigger.

Hi Jeff,

Thanks for you assistance.
It put me on the right.

Two problems I created myself:

  1. I had it in the wrong embed.
  2. I cleared it in another embed by mistake.


Johan de Klerk

LOL Where have we seen that before? Wait just about everywhere.
I’m almost certain there’s a special CPU instruction for ‘Increment and reset to zero’.

You can also set the initial value on your DCT under attributes tab.

Hi everyone,

Thank you very much.



Johan de Klerk