0

Change specific records with button

Hello. 

 

I have two fields, and a button. One field is 'Existing Manager' which is linked to a field Employee. Another is 'New Manager' which is also linked to the same field. In Employee, I have an additional linked to field for Manager, which is also Employee table.

 

The two records 'Existing Manager' and 'New Manager' is there for manager reassignement. I want to have a button that pulls the records that equal Employee.Manager='existing manager' and change the field to Employee.Manager'new manager'

 

I have this so far, which does the looking up portion, but how to I actually make the change when I click the button?

 

let OLD:='Existing Manager'.id;
let NEW:='New Manager'.id;
select Employee where Manager=OLD

Thanks! 

1 reply

null
    • SMoore
    • 3 yrs ago
    • Reported - view

    Got it!

     

    let OLD := 'Existing Manager'.ID;
    let NEW := 'New Manager'.ID;
    let i := (select Employee where Manager = OLD);
    i.(Manager := NEW)

Content aside

  • 3 yrs agoLast active
  • 1Replies
  • 374Views