Code 2 Option String

navuser1navuser1 Member Posts: 1,329
Hi All,

Plz Share your knowledge...

Is it possible to Insert the data(Code) into a Option String Field.
Suppose Data belongs to the Option String always.

Thanks & Regrads.
Now or Never

Comments

  • danlindstromdanlindstrom Member Posts: 130
    :cry: No, its not possible
    You can 'see' the label in the optionstring as a name of a integer value.
    Regards
    Dan Lindström
    NCSD Navision 2.00 since 1999 (Navision Certified Solution Developer)
    MBSP Developer for Microsoft Dynamics NAV 2009
  • David_SingletonDavid_Singleton Member Posts: 5,479
    You could do something like:
    MyText := 'Order';
    FOR i := 0 to 10 DO BEGIN
      SalesHeaderLoop."Document Type"  := i;
      if  format(SalesHeaderLoop."Document Type") = MyText then begin
        SalesHeaderNew."document type" := i;
        MatchFound := TRUE;
      end;
    END;
    

    Mind you I would never recommend doing this, since it would be very problematic. better is to find a better way of solving this issue.
    David Singleton
  • ara3nara3n Member Posts: 9,256
    you can use evaluate
    MyText := 'Order';
    evaluate( SalesHeaderLoop."Document Type", MyText );
    
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • navuser1navuser1 Member Posts: 1,329
    many many thanks to All.
    Now or Never
Sign In or Register to comment.