Setting alpha fields to uppercase

 4 Replies
 0 Subscribed to this topic
 12 Subscribed to this forum
Sort:
Author
Messages
pkabus
New Member Send Private Message
Posts: 0
New Member

I want to set all the text fields for a number of forms to force them to be uppercase. Does anyone know of a way you can do this either globally, or else in the source section?

John Henley
Send Private Message
Posts: 3355
You have to do it via the form definition for each form. However, the problem with that is that technically it's a modification, so you have to be prepared to have it overwritten by future CTPs and MSPs, and keep re-applying it. One way to mitigate it (although you introduce a different set of issues) would be to use Design Studio to perform that logic.
Thanks for using the LawsonGuru.com forums!
John
pkabus
New Member Send Private Message
Posts: 0
New Member

Sorry, John. This is the design studio forum so I didn't bother to note that I am using design studio but should have. I need to find a way in design studio to note that all the alpha fields on the form are uppercase. If there's a way to do that for the form as a whole that's great, otherwise is there a way in the source to set the field as uppercase?

John Henley
Send Private Message
Posts: 3355

Gotcha. What I was implying was that it's *REALLY* easy to implement uppercase if you modify the back-end COBOL form, but there is the drawback of it being a modification.
For Design Studio, there are a couple of ways:
1. In the form XML, you can add the ed="upper" attribute to desired fields.

2. You can also add JavaScript (I would do it in the FORM_OnBeforeTransaction) like this (using CU01 as a example):
function FORM_OnBeforeTransaction(fc)
{
if (fc=="A" || fc=="C")
{
lawForm.setDataValue("CUC-DESCRIPTION",lawForm.getDataValue("CUC-DESCRIPTION").toUpperCase())
lawForm.setFormValue("text2",lawForm.getFormValue("text2").toUpperCase())
}
return true;
}

Thanks for using the LawsonGuru.com forums!
John
pkabus
New Member Send Private Message
Posts: 0
New Member

Perfect - that was exactly what I was looking for. Thanks!