hexagon logo

How do you create an Input Comment with multiple inputs?

I previously created a custom header on the output report by adding additional information to the existing file, FILE_HEADER.LBL. In order to fill the header with relavent information, I have 11 comments (type Input) at the beggining of each program which the operator must fill in to generate the header to the report. The operators have expressed that the multiple pop-ups in a row are slow and frustrating, so I'm wondering if there is a way to create a pop-up with multiple Input slots. I'm looking for something similiar to the new Part Program Dialog Box--in which the operator can put in all 11 pieces of information at the same time. The New Part Program Dialog box allows for three inputs (1. Part name 2. Revision number 3. Serial number) those inputs are not beneficial to me, but I would like something similar that I could edit the names of the inputs and the number of inputs fields that the operator would see.

Hopefully this makes sense. I appreciate any information any of you might have.
Parents
  • Hi, I posted this in another thread, this example shows how to use drop down lists for fixed inputs.

    You can also add a textbox (editbox) control for variable inputs such as serial number etc I've shoe-horned it in to the example below but not checked the code, you should get the idea however.




    To do it with a form...

    1) File>Reporting>New>Form Report

    2) Place a Combo box from the Object Bar onto the form (if the object bar isn't visible press F2)

    3) Right click on the combo box to bring up the Properties window

    4) Expand the 'Advanced' section and change its name (ObjectCode) property to something meaningful (PalletNum)

    5) Click the ListItems property

    6) 'Add' an item (Name is what you want to appear in the listbox, just let the 'Value' be as it is. Repeat as necessary.

    7) Make sure the ComboType property is DropList (not DropDown)

    *NEW*) Repeat the above (from step 2 to 4) but use an editbox instead of a list box, and name it SerNum

    8) Save (File>Save) then Close (File>Close) the Form

    9) In the Edit Window of your program, create an assignment i.e.
    ASSIGN/PNUM=""
    ASSIGN/SERNUM=""

    10) Insert>Report Command > Form and browse to and select your form

    11) To link what is selected in your Form to your Assignment see below

    ASSIGN/PNUM=""
    ASSIGN/SERNUM=""
    CS1        =FORM/FILENAME= C:\USERS\JON\DESKTOP\EXAPMLE.FORM
                PARAM/[COLOR="#FF0000"]PALLETNUM.TEXTVALUE=PNUM[/COLOR]
                PARAM/[COLOR="#FF0000"]SERNUM.TEXT=SERNUM[/COLOR]
                PARAM/=
                ENDFORM/
    


    This links the TEXTVALUE property (what's selected in the drop list) of the control PALLETNUM to the ASSIGNMENT PNUM
    The second line links TEXT propert of the Edit Box SERNUM to the ASSIGNMENT SERNUM

    The user can only select what's in the DropLists, so you can do a quick test to make sure they've selected a value.

    ASSIGN/PNUM=""
    TRYAGAIN   =LABEL/
    CS1        =FORM/FILENAME= C:\USERS\JON\DESKTOP\EXAPMLE.FORM
                PARAM/PALLETNUM.TEXTVALUE=PNUM
                PARAM/[COLOR="#FF0000"]SERNUM.TEXT=SERNUM[/COLOR]
                PARAM/=
                ENDFORM/
                IF_GOTO/PNUM=="",GOTO = TRYAGAIN
                IF_GOTO/SERNUM=="",GOTO = TRYAGAIN
    
Reply
  • Hi, I posted this in another thread, this example shows how to use drop down lists for fixed inputs.

    You can also add a textbox (editbox) control for variable inputs such as serial number etc I've shoe-horned it in to the example below but not checked the code, you should get the idea however.




    To do it with a form...

    1) File>Reporting>New>Form Report

    2) Place a Combo box from the Object Bar onto the form (if the object bar isn't visible press F2)

    3) Right click on the combo box to bring up the Properties window

    4) Expand the 'Advanced' section and change its name (ObjectCode) property to something meaningful (PalletNum)

    5) Click the ListItems property

    6) 'Add' an item (Name is what you want to appear in the listbox, just let the 'Value' be as it is. Repeat as necessary.

    7) Make sure the ComboType property is DropList (not DropDown)

    *NEW*) Repeat the above (from step 2 to 4) but use an editbox instead of a list box, and name it SerNum

    8) Save (File>Save) then Close (File>Close) the Form

    9) In the Edit Window of your program, create an assignment i.e.
    ASSIGN/PNUM=""
    ASSIGN/SERNUM=""

    10) Insert>Report Command > Form and browse to and select your form

    11) To link what is selected in your Form to your Assignment see below

    ASSIGN/PNUM=""
    ASSIGN/SERNUM=""
    CS1        =FORM/FILENAME= C:\USERS\JON\DESKTOP\EXAPMLE.FORM
                PARAM/[COLOR="#FF0000"]PALLETNUM.TEXTVALUE=PNUM[/COLOR]
                PARAM/[COLOR="#FF0000"]SERNUM.TEXT=SERNUM[/COLOR]
                PARAM/=
                ENDFORM/
    


    This links the TEXTVALUE property (what's selected in the drop list) of the control PALLETNUM to the ASSIGNMENT PNUM
    The second line links TEXT propert of the Edit Box SERNUM to the ASSIGNMENT SERNUM

    The user can only select what's in the DropLists, so you can do a quick test to make sure they've selected a value.

    ASSIGN/PNUM=""
    TRYAGAIN   =LABEL/
    CS1        =FORM/FILENAME= C:\USERS\JON\DESKTOP\EXAPMLE.FORM
                PARAM/PALLETNUM.TEXTVALUE=PNUM
                PARAM/[COLOR="#FF0000"]SERNUM.TEXT=SERNUM[/COLOR]
                PARAM/=
                ENDFORM/
                IF_GOTO/PNUM=="",GOTO = TRYAGAIN
                IF_GOTO/SERNUM=="",GOTO = TRYAGAIN
    
Children
No Data