• 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.

display a form based on app variable value

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

  • display a form based on app variable value

    i need to be able to display a form based on an app variable value. How can i accomplish this.
    thanks

  • #2
    Will need more information on this. Is your form widget a popup, in a different section, or the current section?

    Comment


    • #3
      okay so i have a form where the user will scan a barcode, this will call a rpg program passing in an action. if the record being processed needs to display a warning message, i am setting an app variable called warning to W. If the app variable is W i want my popup box to display where the user can cancel the transaction or press okay to continue. pressing okay will call the same rpg application with a different action (ie receiverecord)

      Comment


      • #4
        I would suggest adding an 'Info Widget' from the utility widgets as a popup where you would place the message. Then, add two buttons to that widget: one to cancel and one to continue. 'Cancel' would hide the popup, and 'Continue' would call the RPG program with the action 'receiverecord'.

        Then have your RPG program fire an event, for example, 'showMyWarning', and then add an event listener for that event that will show the 'Info Widget' popup.

        Comment


        • #5
          i am not seeing where the 'info Widget' form the utility widgets is?

          Comment


          • #6
            disregard..i just found it

            Comment


            • #7
              is there a way to edit the info widget once you create it?

              Comment


              • #8
                If you select the widget, you will see a button in the settings for the widget labeled 'Body.'

                Comment


                • #9
                  found it thanks.

                  Comment


                  • #10

                    do you have an example of how to setup the below?
                    Then have your RPG program fire an event, for example, 'showMyWarning', and then add an event listener for that event that will show the 'Info Widget' popup.

                    Comment


                    • #11
                      We did a developer diary on local events that could be helpful just in your scenario; you're firing the event via the RPG program.

                      #031 - Local event listeners in action

                      Comment


                      • #12
                        okay i am still confused. I have a my popup created with the buttons..i get that part. I created an event listener called viewarning, that will show show my info widget. What i dont get is how to call the event viewwarning in my rpg program. (which i only want to call if the item scanned has a warning note)...
                        Attached Files

                        Comment


                        • #13
                          okay disregard..i found out how to fire an event

                          Comment


                          • #14
                            hello, i found an issue that i cant seem to figure out. i have a grid, and select a record, in certain conditions an information popup box will appear with a warning... if the user selects the button to avoid the warning, i am calling a program to process the record....i have a line of code calling setwidget('trackdetail') which is the name of the grid. then i do a for selection 1 to gselectioncnt... gselectioncnt is 0 . it should be 1 for the record i originally selected (check box checked)

                            Comment


                            • #15
                              Are you certain that your call to SetWidget passes the name exactly as it is spelled in your application?

                              Comment

                              Working...
                              X