1 Reply Latest reply on Nov 11, 2009 10:09 AM by philmodjunk

    Scripting a specific field

    Amber3M

      Title

      Scripting a specific field

      Post

      Hi,

      I have 4 field all in a row with different suppliers product numbers in them.

      I want to create a script that when a person clicks on one of hte fields a new window opens with the material description/pricing/availablity etc of that product.

       

      My problem is, that i do not know how to script something that relates to whatever field you click on.

       

      Is this possible?

       

      Thank you for any help!

        • 1. Re: Scripting a specific field
          philmodjunk
            

          I have no real picture of how you've set up your database and thus could be off base here, but:

           

          "I have 4 field all in a row with different suppliers product numbers in them."

           

          Suggests that you may want to re-design your database to use a portal and a related table of this data instead of dedicated fields. That approach is more flexible in many ways.

           

          Answering your specific question can only be done in general terms:

          New Window is the script step that can be used to open a new window and display data such as you describe. In Mac, this is easy. In Windows you have to add a few steps to handle some pretty awful window size changes.

           

          General script outline

          Set Variable[$Data; YourTable::YourClickedField]

          New Window [Specify parameters here to size and locate your window]

          #Add Move/Resize window step here on windows platforms to set parent window to maximum possible dimensions

          Freeze Window

          Go To Layout [Select layout you'll use to display data]

          Enter Find Mode[]

          Set Field[YourOtherTable::YourDataField; $Data]

          Set Error Capture [on]

          Perform Find[]

          Pause/Resume Script

          Close Window

          # if windows OS, Adjust Window[Maximize] here to pop your parent window back out to full size