problem programming superobjects

Mark Terry mark at abernackie.com
Wed Jun 25 05:13:45 PDT 2008


On Jun 17, 2008, at 11:56 PM, Brian Ellis wrote:

> Hi,
>
> Have a database with (among others) these fields:
>
> clientid (text)
> invoiceno (numeric)
> alphainvoiceno (text)
> item1 (text)
>
> In a form window, when you enter the client ID, it runs a procedure  
> (.lookupclient) to look up client contact info and populate address/ 
> tax ID fields

Given limited understanding of the scope of your setup (objectives,  
etc.) a couple things still come to mind: it appears you're accessing  
data from another db, which is therefore, open, and duplicating that  
data in another db, in a record that must be selected. A couple  
different methods that *may* fill your needs would be to  1.) use the  
SOs to display the info only. This would require the other db's to  
always be open, but, maybe they already are. You could set the SO to a  
formula, or have a routine in the special ".CurrentRecord" procedure  
run to put that info into a variable, which the SO could display. That  
way, you wouldn't need the record to be selected 2.) you could put all  
the address info into one field, formatted the way you like. Then it  
would be there, without the other db, or for printing, etc.

> (I am sure there is a faster way to do this than the brute way using  
> formulafill lookupselected, but it works). When you have finished  
> entry of the client id and tab, it goes to the "invoiceno" field  
> (since each client has a unique invoice id...).  Once you have  
> manually entered the invoice number, a tab/return activated a second  
> procedure (.jumptoitem1) that would take the insertion point to the  
> line 'item1' where the data began.
>
> This worked fine until I got the smart idea to split the invoiceno  
> into two fields ('invoiceno' had been just a text field) so it had a  
> numeric and an alpha suffix (i.e. 42A could be an invoice number and  
> I would be able to sort by invoice numbers). I created a field  
> 'alphainvoiceno' as a text file. The vast majority of invoices won't  
> have an alpha field so the procedure to jump to the 'item1' field  
> was OK.

The arguments for text or numeric datatypes can be endless. I've  
gotten to where I just tack on a couple fields to the end of each db -  
one text, and one numeric (Temp and TempNum). If I need sorts, etc., I  
just fill them with the data and go. The extra fields are a small  
price to pay for having the best of both worlds. It would allow you to  
go back to your old setup. Hope this helps

M

> My problem is now the procedure won't jump from the 'clientid' field  
> and stick in the 'invoiceno' field. when you tab out of 'clientid'  
> it fills the contact info properly but then I see the 'invoiceno'  
> field blink once and the cursor stops in the 'item1' field. I have  
> tried a number of changes to the procedures and how I impliment them  
> in the superobjects... it just doesn't work right.
>
> Here are the procedures:
>
> .lookupclient:
>
>
> Field «servicesof»
> FormulaFill lookupselected("All Crew Client  
> DB","clientid",clientid,"A1","",0)
> Field «jobtitle»
> FormulaFill lookupselected("All Crew Client  
> DB","clientid",clientid,"Title","",0)
> Field «clientaddress1»
> FormulaFill lookupselected("All Crew Client  
> DB","clientid",clientid,"Organization","",0)
> Field «clientaddress2»
> FormulaFill lookupselected("All Crew Client  
> DB","clientid",clientid,"Address","",0)
> Field «clientzip»
> FormulaFill lookupselected("All Crew Client  
> DB","clientid",clientid,"Zip","",0)
> Field «clientcity»
> FormulaFill lookupselected("All Crew Client  
> DB","clientid",clientid,"City","",0)
> Field «clientstate»
> FormulaFill lookupselected("All Crew Client  
> DB","clientid",clientid,"State","",0)
> Field «clienttaxid»
> FormulaFill lookupselected("All Crew Client  
> DB","clientid",clientid,"TIN","",0)
> Field «checkto»
> FormulaFill lookupselected("All Crew Client  
> DB","clientid",clientid,"A1","",0)
>
> SuperObjectClose
>
>
> SuperObject "invoiceno","Open"
>
>
>
> HERE IS THE SECOND PROCEDURE:
>
> .jumptoitem1
>
>
> SuperObjectClose
> SuperObject "item1","Open"
>
> beep
>
>
> I will appreciate any help you can offer. Thank you!
>
> --
> Brian Ellis
> brian91202 at gmail.com
> 818-521-8015
> -- 
>
>
> Brian J. Ellis
> brian91202 at gmail.com
> (818) 521-8015

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://provue.com/pipermail/qna/attachments/20080625/916562f4/attachment.html 


More information about the Qna mailing list