I'm trying to work out how to hide form fields that are hidden on the grid. I need the fields as I want to default values into them, but do not want these fields to be visible or available to the end user. Is this possible just through configuration of widgets or do I need to add a helper program to the form widget?
Announcement
Collapse
No announcement yet.
Hiding Form Fields When Used with Edit Grid
Collapse
X
-
?Sounds like the grid validation program will give you what you need.
Below is my edit grid configuration. Suppose when adding a new product I want to auto generate it myself. So when adding I simply omit the field. Notice that I have specified a validation program named "MYVALPGM"...this is copied from EXNABVAL.
? image.png
MYVALPGM has a "processAdd" procedure. Here I will add one line of code to set the value of PRDNO before the record is added to the database.
Code:SetValue('MY_FILE':'PRDNO':'My new product number');Attached Files
-
-
I spoke too soon. Looks like that approach doesn't work consistently. Add is OK, but copy is a problem. I guess I will need to use an RPG program to set fields to defaults. It would be great if this could be done from NAB rather than having to develop custom RPG just to default values into fields.
Comment

Comment