Set Property


i have created an global variable called ColmNo as integer. And i have a table with various fields. what i want to know is how to set the colmNo for each field. like if my table has 4 fields say FIELD1,FIELD2,FIELD3,FIELD4 then i want to assign the ColmNo has this,

FIELD2 := ColmNo 1;

FIELD3:= ColmNo 2;

can anyone guide me in this?


Hi Shona,

It would be helpful to know exactly what it is that you’re trying to do. Are you creating a form or report and what version?

hi eric[:)]

Thanks for your reply.

I am using Nav 2009 SP1…

i have a form which picks up value from another and on changing this picked up value the color wil change!

Now i have kept a button called default and an global var ColmNo as int, What i want is , on clicking the default button after selecting an colmNo, the value in that field should revert back to its original one(the one which was there before changing it).

thats why i want to know how to assign the fields to this colmNo.

thanks [:)]

You want to revert all the values in the table (not the form, the form is just a mean to show/change a table content!), or just the value in a selected line?

Hi anna[:)]

No i want the values in the form to change…oh i thought tables are just to view! And all the changes must be done in a form,which stores the changes in the table…

And as i said i have a global variable called colmNo as int, which i have mapped to a text box and placed in the bottom of the form. And have kept another text box, which is mapped to my entry no! So now this Entryno acts as the line no for me.

So say i have 5 lines in my form,i want to revert back the value of 2 line’s colmNo 4…so i will select the line 2 in the entry no and type 4 in the colmNo text box…then On pressing the default button the action should perform.

Make sense dear?

this is a screen shot…will make you understand clearly [:)]

Sounds like you want an array.

If I’m following correctly… If you click on the field with the red 8.00 and hit your default button - you wan’t the red 8.00 to change to it’s original 7.50 (example) black number. And if you clic on the red 5.00 and hit default you want it to change to original value before the change. As columns can be moved around by users I’m not sure the usefulness of defining columns.

Did you think about using a lookup to the table holding the defaults to return the value?

hi harry…

no i will type the colmNo in the colmNo text box i have placed below the form…only for entry No i wil click the field…rest is as you said [:)]

thanks [:)]

hi jazz

Can you be more explicit ?


So, when the button is pushed (trigger OnPush), you need to retrieve the record in the table holding the default values. How are those default values organized? Which fields or fields are in this table key?

Did you even read at least Basic Objects manual? You cannot do anything in Navision (neither in any other language) if don’t understand the difference between a tables and forms.


yes…i take the values from the Estimation Template Table…table key s no for est temp & entry no for unitwise estimation table.

And as for your question…i dont think i need to answer…as you said that you have seen me answering various post, it would tell you whether i know or not!

Hi Shona,

Look at the help on FIELDNO

Actually by the way you post your questions I sometimes doubt you even know what you are doing. The fact that you sometimes try to answer questions shows your good will, not your knowledge. Sorry.

Then i assure you i do know the differnce! so please can you help me out?

hi dave,

hmmmm but i cant assign values to it na…i want it like

Field No 1 := ColmNo 1


hi dave…

Whst is this?

i tried using the fieldno…but couldnt!

Hi Shona,

Did you read the help and try out the example?

This returns the field number of a field, so you can use this to link the variable to an integer.

hey dear i did! i mean read it… but sorry to ask but how do i link it?

see as of now my code is

IF lUnitWise.GET(“Entry No”) THEN BEGIN
IF (“gColm No” IN [“gColm No”:: one]) THEN BEGIN
lUnitWise.“Conceptual Design(CD)” := gEsttemp.“Conceptual Design(CD)”;


how do you suppose i use FieldNo in this?