View Full Version: Read Only Field On Form

LawsonTalk > Coding, Program Errors and Bugs > Read Only Field On Form


Title: Read Only Field On Form


lpatena - September 29, 2006 03:05 PM (GMT)
Hi all -

Is there a simple way to make a field read-only on a form? I want to have data display in that field - but I don't want ANYBODY to be able to update it (regardless of security class, etc). It seems like such a simple thing - but I can't find any examples of it.

Unix
Oracle
Apps 8.0.3 MSP8
Env 8.0.3 ESP6

Thanks in advance,
Laura

Ragu - September 29, 2006 03:56 PM (GMT)
You should be able to take care of this by making changes to the .scr file. Let us say the field Vendor# is painted as

Vendor: & ]

change this to
Vendor: ; ;

Down below in the TRANS section (I think), if it is defined as type SR (required) or SN (key), you may need to change it SB (optional) or srgen may barf

Milo - September 29, 2006 04:37 PM (GMT)
Ragu is correct. Here's my 2-cents'-worth, thrown in for good measure:

Primary reference is the Application Development Workbench Standards manual, Application Form Definition section.

Field display that is NOT editable is shown as text on window background, not in a text box.

In the SCREEN section:

[ ] <-- Denotes editable input box

; ; <-- Denotes display-only text area

In the $TRANS area (Transaction Data Section), use this for your display-only field:

Field Type (columns 31-32): A or AL - Displays AlphaNumeric or AlphaNum w/Lowercase
Editing Code (col's 49-50): SB - Form field that's not required

Now here's the tricky part, not well-documented. How do you populate that sucker? One way is by using the Key Number (KN column in $TRANS, col's 55-56). That's a whole subsystem in itself, I can't explain it here. Once the Key Number is set up properly, when you do a Select in an associated field, the proper information populates automatically into your display-only field.

But, this being Lawson, there's another catch. You must populate that display-only field manually in your program, when you do an Inquire, a Next, or a Previous. If you don't, the data is not automatically updated when the user moves through the data.

If you are still confused, I can post an example COBOL program that I wrote "from scratch" (actually, just a modified screen-paint).

One last caveat: If you are customizing an existing Lawson program, you may have to do a lot of analysis before getting it to work correctly. Watch out, those things are tricky.

lpatena - September 29, 2006 04:52 PM (GMT)
Thanks all - believe it or not Lawson GSC came through for me on this one. They actually responded right away to tell me what to do along with all the caveats.

I've made the change and it's doing exactly what I expected and you're right - I do have to populate it manually (I do it via Special Actions buttons I set up) and I do have to do the move to screen, etc after the change - but I had expected that.

- LP

mthedford - September 29, 2006 10:29 PM (GMT)
If you are using Portal exclusively, and have Design Studio, it is even simplier. All that is needed is to change the field to an Output Only field on that form and you are done.

lpatena - October 2, 2006 12:38 PM (GMT)
Unfortunately ... we are still in the dark ages on LID .....



Hosted for free by InvisionFree