Trigg 'create table' and automatic link between table
Hi all. I Have 2 linked tables 'Projet' and 'Planning'. I wanted to create a trigg record on 'Planning' when i add a new record on 'Project' and copy/paste some informations (like date, object).
I used :
let thisProjet := this;
let p := (create Planning);
let myd := 'Date de notification';
let myp := thisProjet;
p.(Jalon := "example");
Planning.('Date limite' := myd);
Planning.(Projet := myp)
It works a new record is created and information are copy/paste, but the problem is that the new record created on 'Planning' is not linked to 'Projet' automaticaly. What did i do wrong? many thx.
8 replies
-
Try this:
let key := this;
let myd := 'Date de notification';
let p := (create Planning);
p.(Projet := key);
p.(Jalon := "example");
p.('Date limite' := myd)
-
Fantastic. Everything works perfectly. Thank you so much Dean !
-
Fantastic. Everything works perfectly. Thank you so much Dean !
-
Another configuration : I Have 2 linked tables ('Projet' with subtable 'Phases') and ('Planning'). I wanted to create a trigg record on 'Planning' when i add a new record on 'Phases' and copy/paste some informations (like date, object). Is there a way to link with 'Projet' and 'Phases'? many thx.
-
Add "Trigger on create" to Phases to add new record to Planning:
let p := (create Planning);
p.(Jalon := "example2");
p.('Date limite' := today())
-
Hi, and thanks again Master Dean, i tried this before, and the problem is that the record is created without the link with table 'Projet'.
-
You could go into Edit Fields in Planning and drag over the Phases reference from right to left. I did not realize you wanted to create a reference (relation).
-
Ok thank you very much. I will try like this.
Content aside
- 4 yrs agoLast active
- 8Replies
- 760Views