CAPITAL Office Business Software
CAPITAL Support Forum
FAQSearchMembersGroupsRegisterProfilePM'sLogin/Out
Paste a form into the stock screen

 
Post new topic   Reply to topic    CAPITAL Office Business Software Forum Index -> Scripting & Customisation
View previous topic :: View next topic  
Author Message
Joseph
Guest





PostPosted: Tue Sep 05, 2006 5:39 pm    Post subject: Paste a form into the stock screen Reply with quote

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.
Back to top
COBS Tech Support



Joined: 09 Sep 2005
Posts: 651

PostPosted: Tue Sep 05, 2006 5:48 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    CAPITAL Office Business Software Forum Index -> Scripting & Customisation All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

phpBB Template by Vereor
Protected by Anti-Spam ACP