How to set value of Option


#1

Hi,

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.

Regards

Johan de Klerk


#2

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.


#3

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.

Regards

Johan de Klerk


#4

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’.


#5

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


#6

Hi everyone,

Thank you very much.

Appreciated.

Regards

Johan de Klerk