Ensure UpperCase on field

19 views
Skip to first unread message

Ari Sobel

unread,
Aug 4, 2025, 9:05:37 AMAug 4
to Jam.py Users Mailing List
Hi to all,

i want to ensure Upper case on a field,

I've tried the below code:
   function on_before_field_changed(field) { 
           if(field.text && field.field_name=="pedido_base"){ 
            field.text = field.text.toUpperCase()
     } 
 }

  But I've gotten the following msg:

image.png

Dean D. Babic

unread,
Aug 4, 2025, 9:36:22 AMAug 4
to Jam.py Users Mailing List
One of the main obstacles with using “on_field_changed” is a infinite loop happening. For example one field changing the field we are expected to “monitor”.

Dean D. Babic

unread,
Aug 4, 2025, 11:26:03 PMAug 4
to Jam.py Users Mailing List
It is this:
function on_before_field_changed(field) {
    if (field.field_name === ' pedido_base' && field.new_value) {
        field.new_value = field.text.toUpperCase();
    }
}

I would suggest to check the Docs Ari:
Reply all
Reply to author
Forward
0 new messages