LAST_VALUE

16 views
Skip to first unread message

bourah...@gmail.com

unread,
May 23, 2024, 6:53:00 AMMay 23
to Jam.py Users Mailing List
PVC.pngHELLO IS THERE A PROCEDURE TO ASSIGN AN AUTOMATIC VALUE FROM THE LAST VALUE RECORDED WITHOUT ENTERING THIS VALUE AND THANK YOU

Danijel Kaurin

unread,
May 24, 2024, 12:15:01 PMMay 24
to bourah...@gmail.com, Jam.py Users Mailing List
Hi.

You can try something like this for server on_apply method:

    if delta.rec_inserted():
        if delta.master:
            copy = task.invoice_table.copy()
            copy.set_where(invoice=delta.master.id.value)
            copy.open(fields=['number'], connection=connection)
            number = 0
            for c in copy:
                if c.number.value > number:
                    number = c.number.value
            delta.number.value = number + 1

This works on V7.

Regards


On Thu, 23 May 2024 at 12:53, bourah...@gmail.com <bourah...@gmail.com> wrote:
PVC.pngHELLO IS THERE A PROCEDURE TO ASSIGN AN AUTOMATIC VALUE FROM THE LAST VALUE RECORDED WITHOUT ENTERING THIS VALUE AND THANK YOU

--
You received this message because you are subscribed to the Google Groups "Jam.py Users Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jam-py+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jam-py/55c1b7c0-534d-40cc-a721-6c3d17cdddcfn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages