Incrementing a field on record creation
I have a field called 'Image Number' When I create a new record I want this filed to contain the current Image Number incremented by one.
Looking through other questions I tried the following code:
let temp := max((select photos).'Image Number');
'Image Number' := temp + 1
This is for "Trigger after update" . When I creae a new record, the Image Number field is blank. I believe I should be doing Trigger on create, but I don't see that option.
Thanks for your help.
5 replies
-
-
Thank you. I'll look for that.
-
Thank you. I updated the Trigger on create field with:
let myVar := max(select photos).'Image Number';
'Image Number' := myVar + 1Image Number is a number field. The current value is 2300. Every time I create a new record, I'm getting an Image Number value of 1.
-
Try changing
max(select photos).'Image Number'
to
max((select photos).'Image Number')
-
That was it. THANK YOU!
Content aside
- 5 yrs agoLast active
- 5Replies
- 1246Views