How To Add Option String In Runtime

chandruchandru Member Posts: 15
edited 2009-08-18 in Navision Attain
Hi.,

i am new to the C/AL PROGRAMMING and trying out few things..can anyone tell me how to add option string during runtime using CAL PROG.,.

thanks in anticipation

bye,chandru
You cannot discover new ocean unless you have the courage to lose sight ofthe shore.

Comments

  • LouisLouis Member Posts: 78
    This is a function sample code

    gf_DynamicOptionList()
    //TO SPECIFY OPTIONS AT RUN TIME, USE A NORMAL VARIABLE AND
    // ASSOCIATE CODE LIKE THIS IN THE LOOKUP TRIGGER OF THE ASSOCIATED TEXT BOX
    txtPaymentOptions := 'Visa, Master, Cash, Cheque';
    codePayment := SELECTSTR(1+STRMENU(txtPaymentOptions),
    'NONE, '+ txtPaymentOptions);
    MESSAGE(codePayment);

    Louis
    Thanks to RSS
  • redroseredrose Member Posts: 36
    Hi,
    Louis wrote:
    This is a function sample code

    gf_DynamicOptionList()
    //TO SPECIFY OPTIONS AT RUN TIME, USE A NORMAL VARIABLE AND
    // ASSOCIATE CODE LIKE THIS IN THE LOOKUP TRIGGER OF THE ASSOCIATED TEXT BOX
    txtPaymentOptions := 'Visa, Master, Cash, Cheque';
    codePayment := SELECTSTR(1+STRMENU(txtPaymentOptions),
    'NONE, '+ txtPaymentOptions);
    MESSAGE(codePayment);

    Louis
    Thanks to RSS

    Hi,

    This Worked... \:D/

    Could you please tell me ,how can i change the Vertical allignment of this options to horizontal.Because i have more options.

    please help
    Thanks & regards
    Rose :D
  • matttraxmatttrax Member Posts: 2,309
    If you have that many options you should store the options in a table and do a lookup to select the value.
  • BeliasBelias Member Posts: 2,998
    matttrax wrote:
    If you have that many options you should store the options in a table and do a lookup to select the value.
    AKA: you can't put options horizontally :)
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
Sign In or Register to comment.