Sage 100 SQL - Use Script Tied to Button on Production Entry Header to Open UDT Screen and Return Data From UDT to Production Header

SUGGESTED

Is it possible from the Production Header panel, via a script, either tied to a button click event or on one of the table events, to open an existing UDT (so that the user can see the UDT), then get a value from it and set a textbox on the Production Header panel?

What I am looking to do is have the user open Production Entry, click a button to open a UDT (that is already populated with data) and have it show to the user, then allow the user to click a UDF checkbox on the UDT to select and return a value from the row of the checked UDT to the Production Header screen to set a textbox. The reason we want to use this approach is because the data in the UDT will change based on some action they take when creating the Production Entry record.

I have seen some code out there on how to access a UDT and other MAS90 tables in memory which I have done before, but I have never been able to/know a way to open a UDT and have it show to the user.

Thanks in advance!

  • 0

    Not sure if I understand the requirement correctly, but you can create the UDF on the Production Entry Header with validation against the UDT (the field length needs to be the same as the key in the UDT). When you do that Sage will automatically add the lookup button to the UI in Production Entry and you can select the record from the UDT.

  • 0 in reply to BillyVanilli

    Thanks Billy,

    Yeah that is one option for us, but we were hoping to make it dynamic such that if we populated the UDT (and one of the columns of the UDT is a checkbox column, we could essentially use the UDT as a grid to select things. I was looking for the syntax in a script to open a UDT and show it to the user.

  • 0 in reply to it_q-lab
    SUGGESTED

    I don't know how to do that but you could do the following:

    1) Create the UDT fields as UDFs on the Production Entry Header

    2) Add those fields to a custom panel for Production Entry (button panel)

    3) When the user selects the line from the UDT (through the lookup described in my first post) fire a script to write the UDT values for the selected record to the UDFs on the Production Entry Header and have the script open the panel (script clicks the button)

    4) All fields that don't need to be modified by the user can be set to read only, or not shown on the panel at all. Let the user change the data on the panel.

    5) When they click the okay button or a custom button that you create fire a script to update the UDT based on values of the UDFs on the Production Entry Header.

    Probably not the most elegant way, but I use it every now and then when I need a mini UI in scripts.

  • 0 in reply to it_q-lab
    SUGGESTED

    I use Internet Explorer sans menus and icons to pop-up table displays. You could do the same with the UDT fields if you know a bit of HTML and scripting.
    The only problem being is that IE is at end of life and Edge doesn't yet support the document object model (DOM).