do not type data manually in Text field on form???

kishi_gkishi_g Member Posts: 162
edited 2008-01-24 in Navision Attain
Is it possible The person do not enter data manually in Text field on form.
he use the lookup button on that text field. he selects the data through lokup button only.






Thanks & regards,
Kishore.

Comments

  • DenSterDenSter Member Posts: 8,307
    Have you tried setting the field to non editable? I don't know if that leaves the lookup button, but that's what I would try first.
  • kishi_gkishi_g Member Posts: 162
    Hi Denster,
    Thanks for ur reply. If we set the property editable as No then we can not select record in the lookup table. the lookup data will not come to the text field if it is in non editable mode.






    Thanks & Regards,
    Kishore.
  • McClaneMcClane Member Posts: 40
    I think you will have to set it to editable=no and put some code in the OnLookup-Trigger, e.g.:
    if form.runmodal(0,ItemCategory)=Action::LookUpOK then
      "Item Category Code":=ItemCategory.Code;
    
  • krikikriki Member, Moderator Posts: 9,115
    You can put an error in the OnValidate-trigger of the field. And you can put this code in the OnLookup-trigger of the field:
    recTheTable."Primary Key Field" := "Your Field On The Form";
    IF FORM.RUNMODAL(0,recTheTable) = ACTION::LOOKUPOK THEN BEGIN
      VALIDATE("Your Field On The Form",recTheTable."Primary Key Field");
      CurrForm.SAVERECORD;
    END;
    
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.