0

How to select more than one option from a multiple choice when creating a record from a button?

Hi

i have a field with multiple choice in a subtable 

when creating a record from a button in a master table how do I preselect 2 or 3 choices?  I am able to select just one,

this is my code :

let LNK := Id;
let NW := (create 'Artículos incluidos en el contrato');
NW.(Status := 1 + (Cantidad := 1) + ('Tamaño' := 8) + ('Selección' := 1) + (Acabado := 1));
NW.(Contratos := LNK);
popupRecord(record('Artículos incluidos en el contrato',1))

the field is “Acabado” and I want to preselect 1 and 2 or maybe 1, 2 and 3, but just can select one of the options.

Also how can I make popup the record I just created? The way I have the the script a new record not related pops.

Thank you for your help 

Best regards

4 replies

null
    • Nick
    • 5 yrs ago
    • Reported - view

    For popup the correct record:

    ...

    NW.(Contratos := LNK);
    let childId := number(NW.Id);
    popupRecord(record('Artículos incluidos en el contrato',childId ))

    • joseefren
    • 5 yrs ago
    • Reported - view

    Awesome Nick, that worked great, now I just have one question left

    • Sean
    • 5 yrs ago
    • Reported - view

    To preselect choices you will need to use a numeric array. Something like mcField := [1, 3, 5] will set the first, third, and fifth choices of the multiple choice field.

    • joseefren
    • 5 yrs ago
    • Reported - view

    Thanks Sean, that worked great too, awesome.

Content aside

  • 5 yrs agoLast active
  • 4Replies
  • 1599Views