I have an app that is basically just a select * from the DB2 table, and displays in edit grid view. I wanted to add a button to prompt the user to browse for a file they have locally and then kick off the process to import that file into the table. I vaguely remember that it is done through a button behavior that calls a RPG script and that there was an example one provided. Could I get an example of how this is done?
Announcement
Collapse
No announcement yet.
How to allow user to import CSV through button behavior?
Collapse
X
-
Yes, just add a button to the application, then add a "Call RPG Program" action. Next, select the "Prompt User for More Information" section and add an upload field. Since you specified CSV, you can add a valid extension of csv. Below are a couple of images showing this.
You will want to copy the template RPG program "EXNABBTN03," which will allow you to easily save the file on the IFS.
Forum NAB RPG Call Action.png
Forum NAB Prompt For More Info.png?

Comment