Image copy from Child Table to Parent Table
Here is my scenario:
Multiple people perform maintenance on Master Items. When they complete, they take a picture of the item and that image gets posted to an Item Image table. One Master Item may have 0 to Many Item Images.
To save time for personnel, when a new maintenance Item Image is captured, that latest image is copied back into a ‘Current Image’ field in the Master Item table (replacing any prior).
I want to place the code in a trigger. How do I structure the code to copy the image back to the right parent record?
let a := last(select ‘item image’)
help>> where ‘master item id’ = ‘item image’.’master item id’
‘Master Item’.’Current Image’ := a.Image
1 Antwort
-
I would place a function field in the main table:
---
last(sub-table).imagefield
---
then you will automatically see the last captured imageLeo
Content aside
- vor 2 JahrenZuletzt aktiv
- 1Antworten
- 145Ansichten