• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

tying a button to a popup form

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • tying a button to a popup form

    i have an app that is using an edit grid and in behaviors I have put an Add button for adding a scheduled job (the grid uses an SQL on qsys2.scheduled_job_info, so can't use add from grid configuration). I added an Add button ( screen shot.docx ) and was wondering if there is a way to pop up a form when clicking the button to be able to fill in fields I will need for the ADDJOBSCDE in my program... or, what is the best way to accomplish this?

  • #2
    I assume that your "Add" button will "Call RPG Program", correct? If so, you can select "Prompt User For More Info" and add as many input capable fields as you like.

    Comment


    • #3
      I was planning on doing it with a form and calling a program, I didn't realize that you guys have really beefed up that "prompt user..." section! haven't seen it in a while... The only problem i see with it is I am going to need an inline dropdown instead of using a data source - is that possilbe?

      Comment


      • #4
        It must be linked to a data source but you can roll your own data in the data source...

        Example:
        Code:
        WITH tempt AS (
          (
            SELECT
              1 as id,
              'Jocelyn' as name
            FROM
              sysibm.sysdummy1
          )
          UNION ALL
          SELECT
            2 as id,
            'Gabbie' as name
          FROM
            sysibm.sysdummy1
          UNION ALL
          SELECT
            3 as id,
            'Lorena' as name
          FROM
            sysibm.sysdummy1
          UNION ALL
          SELECT
            4 as id,
            'Tiertza' as name
          FROM
            sysibm.sysdummy1
        )
        SELECT
          id,
          name
        FROM
          tempt

        Comment


        • #5
          works good... how do I prepopulate the the "Prompt User for More Information" fields with the data from the selected row in the case of an edit?

          Comment


          • #6
            Setting app variable(s) from the selected row then linking the app variable(s) to the field(s) in the prompt for more information

            NAB Prompt For More Info App Var.png

            Comment


            • #7
              Gotcha, starting to see the value of app variables... Is there a way to make a field read only on the "Prompt for more..." screen?

              Comment


              • #8
                No, right now prompt for more information fields are always editable. Instead of using prompt for more information you could create a form widget that gets the information you need and display information "read only" then call your RPG program.

                I will add a feature request to be able to set fields in prompt for more info as read only based on an app var.

                Comment


                • #9
                  Gotcha, that would be great! the "Prompt User for more..." is very handy!

                  Comment


                  • #10
                    The read only via app variable is in the latest 6.1 build

                    Comment


                    • #11
                      Great! Thanks!

                      Comment

                      Working...
                      X