Paste a form into the stock screen
  • Joseph

    Paste a form into the stock screen

    by Joseph » Tue Sep 05, 2006 5:39 pm

    Hi,

    Anyone have a script that will let me look-up the contents of the Capital folder and let me choose a form? I have a set-up a form that gets printed with each invoice I save for every kit on that invoice that has a form linked to it. I put the form name in a stock user field. Rather than remember the form names I want to be able to press a button and select the form from a list.

    Thanks.
  • COBS Tech Support
    Posts: 660
    Joined: Fri Sep 09, 2005 8:23 am

    by COBS Tech Support » Tue Sep 05, 2006 5:48 pm

    Create a field object and ensure that the parameter 'Look-up Button' is ticked and inside the Formula tab paste the following script. This script also removes the '.STY' extension from the selected file name for neatness.

    ***

    If ButtonPress
    Declare cForm Type Character
    cForm := InputFile('STY', TRUE, PathProgram())

    If "\" $ cForm
    cForm := Substr(cForm, RAT("\", cForm) + 1)
    Endif

    If "." $ cForm
    cForm := Left(cForm, AT(".", cForm) - 1)
    Endif

    SCRWrite("KITFORM", cForm)
    Endif

Who is online

Users browsing this forum: No registered users and 0 guests