how to get field value using feildref variable......

vijay_sr261982
vijay_sr261982 Member Posts: 39
here i get u the code which i execute but am getting empty value

delclaration
sourceref as record ref
outfield as feildref

Code
sourceref.GETTABLE(Item);
for i := 1 to sourceref.count do
outfield :=sourceref.FIELD(i);
message('%1',outfield.value);

how to pass feildref variable and get the feild value this.............

Comments

  • gulamdastagir
    gulamdastagir Member Posts: 411
    hi vijay,

    iam able to get the values with the following code:

    sourceref.GETTABLE(Item);
    for i := 1 to sourceref.count do
    Begin
    if sourceref.FIELDEXIST(i)
    then outfield :=sourceref.FIELD(i);
    message('%1',outfield.value);
    end;
    Regards,

    GD
  • vijay_sr261982
    vijay_sr261982 Member Posts: 39
    thank u very much gulamdastagir


    \:D/
  • pduck
    pduck Member Posts: 147
    Be careful when using Option-Variables. For example Format(FieldRef.VALUE) and Format(FieldRef) gives back different values. In once case the Option String Value and in another one the Option Caption Value.