0

Choice selection for all field in table

Hi, how can a set the same choice-value off one record to all records in a table?

8 replies

null
    • Ninox partner
    • RoSoft_Steven.1
    • 3 yrs ago
    • Reported - view

    With a loop in the trigger after update of that field can do the trick I think.

    let a := ChoiceField

    for i in select Table do

    ChoiceField := a

    end

    Steven.

    • Ninox partner
    • RoSoft_Steven.1
    • 3 yrs ago
    • Reported - view

    With a loop in the trigger after update of that field can do the trick I think.

    let a := ChoiceField

    for i in select Table do

    ChoiceField := a

    end

    Steven.

    • wynand
    • 3 yrs ago
    • Reported - view

    Hi Steven, unfortunately that did not work.

    let a := 'Show Time';
    for i in select USA do
    'Show Time' := a
    end

    • Ninox partner
    • RoSoft_Steven.1
    • 3 yrs ago
    • Reported - view

    oops,

    Should be

    let a := 'Show Time';
    for i in select USA do
    i.'Show Time' := a
    end

     

    Sorry about that.

    Steven

    • wynand
    • 3 yrs ago
    • Reported - view

    cool thanks that worked.cheers

    • wynand
    • 3 yrs ago
    • Reported - view

    Hi Steve, the code works for choice, but the moment I apply the same code to a yes/no field its says cant change data, any advice on how to select true on all records if chosen for one? Thanks

    • Ninox partner
    • RoSoft_Steven.1
    • 3 yrs ago
    • Reported - view

    Hi,

    This works:(in the trigger after update of the Yes/No field)

    let YN := if 'Yes / No' = true then "true" else "false" end;
    for i in select USA do
    i.('Yes / No' := YN)
    end

    Steven

    • wynand
    • 3 yrs ago
    • Reported - view

    Thanks, I found but using your first solution at the trigger after update in the table section also worked, but funny enough not at the record level.

Content aside

  • 3 yrs agoLast active
  • 8Replies
  • 1170Views