0
Create new record with outside button
Hello everyone, there is a “daily result” table and a button that is not in this table. I need to program the button so that it creates a new record in the table “daily result” and copies the value of the choice field "CHOICE" and open new record
7 replies
-
Take a look at your hotel DB. Isn't there a button that creates records in other tables?
-
Hi Can you use the duplicate() function. Sub-tables are duplicated with the relationship intact.
let t := this; let oldData := last('Daily Result' order by Date); let newRec := duplicate(oldData); newRec.Date := t.Date + 1
Also, would
newRec.Date := today()
be better as t.Date+1 might not bring you up-to-date if today is Monday and the last Daily Result was Friday. And then your code would be even shorter
let oldData := last('Daily Result' order by Date); let newRec := duplicate(oldData); newRec.Date := today()
Regards John
Content aside
- Status Answered
- 1 mth agoLast active
- 7Replies
- 48Views
-
3
Following