I am trying to update the field value of a field in a grid control with a value from another field in the same grid control and I would like to do that using Triggers. Is there a way I could do this?
The trigger works for all rows on submission but yeah not on individual ones. For individual ones, I've used the onUpdate call where I can specify the grid number and row number and then update the ones I need.
Could you explain your situation a bit more? Do you want to update the field when you press the Save button?
Yes that's correct.
I guess I would do that the following way: Create an Update Field Value trigger and set timing to After Create and After Update. Give the trigger a name and select the On field change (the field that will trigger the trigger). Now select the Field to Change. In the Change Value Formula, put the code that generates the new value of the field. (Make sure to return that value.) Now press save, if everything went correctly your field should now update.
It doesn't take in the grid row? Is there a way I could specify that? Or I can only use the OnUpdate function available when configuring the Grid Control?
The trigger runs when you press the Save button. When you press Save Rollbase which grid records changed and will run the trigger on those records. The server doesn't use the grid row numbers to see whether the related records had been updated.
Have you tested the trigger?
Gian Torralba "After Create" and "After Update" triggers do trigger on Grid records, right?
IramK does that mean you found a solution?
Yes I did as I mentioned.
Please consider using "on finalize" timing option for your trigger.