I was sent data and the phone numbers were in two seperate fields, how could I make it so ObjectPal Will run through the fields and put them all in one field if there is a way please Help. thank you..
If this is a one-time event, you do not need to combined the two fields using object-pal. You can easily accomplish this by creating a query that will combine the two values, F1 (areaCode) and F2 (oldNumber), and insert same into a new field F3 (newNumber).
First, add the third field to your table.
Second, create the query. While in field F1, hit F5 to tell Paradox you are going to create an example element, then type AC. If you did this correctly, "AC" and "NUM" will appear in red. Go to field F2, hit F5 and type NUM, which will again appear in red. Go to field F3, and type the following string exactly as shown below:
not BLANK, changeto "(" + AC + "" + NUM
Before typing AC and NUM, you must again hit F5 to let Paradox know that that you are making references to the F1 and F2 fields. AC and NUM will appear in red if done correctly. Run the query.
If row 1 contained the following text 123, and F2 contained the following text 456-7890, it will be displayed as (123)456-7890 in field F3 after you run the query.
I would only go the object-pal route if this was going to be an ongoing process. First you must create a button on your form, which you will click on every time you want to run your query. In design mode, right-click on the button, and select the pushbutton event. Sample code appears below:
;*******************************************************
;program which combines F1 (area code) and
;F2 (phone number) and displays in
;F3 (area code and phone number)
;*******************************************************
method pushButton(var eventInfo Event)
var
qVar Query
teleNum String
tv TableView
endVar
; create query string which points to your database
; my query points to the test.db
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.