CAPITAL Office Business Software
CAPITAL Support Forum
FAQSearchMembersGroupsRegisterProfilePM'sLogin/Out
Connecting to another company database

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



Joined: 12 Mar 2008
Posts: 61
Location: Queensland

PostPosted: Wed Mar 12, 2008 4:24 pm    Post subject: Connecting to another company database Reply with quote

Situation:
Two companies in CAPITAL
Some products stocked by the two companies overlap using the exact same part number

Question:
Is it possible for the stock lookup screen to link to the other company stock.dbf database to show their available quantities?
Back to top
View user's profile Send private message Visit poster's website
COBS Tech Support



Joined: 09 Sep 2005
Posts: 651

PostPosted: Thu Mar 13, 2008 1:04 pm    Post subject: Reply with quote

This should be possible but would require at least the Enterprise or Corporate Editions.

Firstly, you would need to add your own 'user' column to the find/look-up window. The topic: "Stock Find User Column Hook (R-SFColn.MAC)" explains how to do this.

Secondly, you would need to open the second stock file within the column. You can use the OpenTable() function to do this (consult the Visual Builder help file) but you would need to specify both a path and an alias, i.e.,

OpenTable(PathData() + "Company2\Stock.dbf", "Stock2")

Then use Find() to locate what you are after, i.e.,

Stock2->(Find(Stock->Name))


Last edited by COBS Tech Support on Thu Mar 13, 2008 7:57 pm; edited 1 time in total
Back to top
View user's profile Send private message
coldrick



Joined: 12 Mar 2008
Posts: 61
Location: Queensland

PostPosted: Thu Mar 13, 2008 7:21 pm    Post subject: Reply with quote

I'm only fairly new to the scripting, but I got this working.

Declare StockAtB Type Character
OpenTable("Z:\CAPITAL\TESTCO2\Stock.dbf", "Stock2")
Stock2->(Find(Stock->Name))
StockAtB := Stock2->Stock_In
Return { "Stock at Other Company", "Stock LOC2", 12, 2, 15, StockAtB }

Thanks.
Back to top
View user's profile Send private message Visit poster's website
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