syntax

hi

can somebody help me… here is the scenario…column1 and column2…column1 is a boolean values yes /no…if column1 value is NO then column2 is disable/editable else column2 enable/editable…can someone help me with the code and where to put it…or if there is a way to set it up… in nav5

thanks,

Put code onvalidate trigger of column1.

If column1 = true then

column2.editable=True

else

column2.editable=false

hi IMRAN tried it but does not work,

Hi Victor

Place the below code at column1 - OnValidate() (Go to the design mode of your form click column1 control press F9 you can find Column1 - OnValidate() trigger).

If column1 then

CurrForm.column2.editable(true)

else

CurrForm.column2.editable(false);

Thanks

MArshal.J

hi

error message there must be a true/false expresssion in IF

what is the condition?

thanks

Column1 is not your control name it shoud be your the name table field and

column2 should be your form control name

Column 1 is should be the name your table field

column2 should be the name of control

I was just trying to give you hint. It is just a pseudo code. After reading all other replies i realised that you should go back to C/Side manual :slight_smile:

condition pls :smiley:

If rec.column1 then

CurrForm.column2.editable(true)

else

CurrForm.column2.editable(false);

Its working fine

rec.column1 is the condition, provided that column1 is the name of a boolean field in the sourcetable (rec).

hi

the syntax works fine…if enable function but not in editable function

thanks,

Hi Victor

it working fine for editabkle also.Using this code you can change Editable/Non Editable property of

a control.You cannot change table field’s Editable/Non Editable property.

Thanks

Marshal.J

hi

is tthere a way to disable column1 row 1? in the requisition worksheet version NAV5

here is the situation… if column1 is yes then column2.disabled (true) else… but i would like to disable (column2 row1) only…so that in the next line column2 should be disabled(false) is this possible???

many thanks,

can you try this column1 is confirmed column and column2 is vendor no. column… …vendor no. can still be edited even if confirmed column has a value of no…

many thanks

Hi Victor,

yes that’s possible (if I understood it right what your trying to do). Just place your code in the onaftergetrecord-trigger then it should work this way:

You tick col1 in row 1 → col2 isn’t editable anymore

You don’t tick col1 in row2 → col2 in row2 is editable.

Regards Jan

Hi Victor,

Please do not open new post when you have already asked the question and been answered.

http://dynamicsuser.net/forums/p/32447/170530.aspx#170530

I joined the two topics

where can i find the onaftergetrecord trigger ?

thanks,

here’s the scenario…

col2 =vendor col1=confirmed

first i select a (row1,column2)vendor then put tick mark on confirmed(column1,row1)…vendor on row 1 should be editable(false)

in the next line the vendor column should be editable again…but the selected vendor on row1 should not be editable…can this work?

many thanks