IT SOLUTIONS
 Message Board
 Members Only

#### Prestwood eMagazine

December Edition
Subscribe now! It's Free!

 ► MB Lobby ► Corel Paradox / ObjectPAL Coding Board ► Paradox Forms Topic

# pick list and field info based on formula

 pick list and field info based on formula in Paradox Forms topic (part of our Corel Paradox / ObjectPAL Coding group). Quick Search: formula   pick list   pick list field   info based
 pick list and field info based on formula Post ID #15271, 18 replies 12/10/2015 5:35:21 AM
Lynda.S
-- --

I'm a new Paradox user and need help with setting up data entry.

I am developing a database for a girls club at church.  I will be tracking current address for each girl, as well as what badges they have earned and info for ordering the badges and supplies needed.

At this time:

Address contains contact info and parents names. The key field is Family. Some families will have more than one child in the program.

RecG contains the girl's name, birthdate, age, grade, club, club year, club offset, and Family (linked to Family in Address)

I need to know how to calculate the club from the grade, cYr and cOffset.  cYr will contain a number from 0 to 4; cOffset will contain a number from -2 to 2.  At this time the grade is an alpha field which can be k3, k4, k5, 1, 2, ..., 12; it can possibly be changed to a number field if needed and the k3, k4, k5 can be changed to .3, .4, .5

Club Info: 2R is a 2 year program, 3D = 1 year, 4P = 2 years, 5S = 3 years, 6F = 3 years. 7G = 4 years

Also, the only way to change the club should be by changing the grade, cYr, & cOffset.

Will this be done through the form or the actual table or somewhere else?

Posted 6 years ago (Thread Starter)
 Comment Quote
 Visit Profile
Approved member.
Member subscribes to this thread with a verified email.

Post ID #15271, 18 replies
View Counter=2741
Last Reply Posted 12/13/2015 8:02:47 PM)
Location=-- --
Joined=6 years ago   MB Posts=12
 RE: {Too Long!} 12/10/2015 7:44:05 AM
Lynda.S
-- --

In looking at this further I need to be able to add fields together such as Last+", "First+"-"+Year    and use that as a key field to tie child records to.

Posted 6 years ago (Thread Starter)
 Comment Quote
 Visit Profile
Approved member.
Member subscribes to this thread with a verified email.

Post ID #15272 (Level 2) and Parent is 15271
Location=-- --
Joined=6 years ago   MB Posts=12
 RE: {Too Long!} 12/10/2015 8:44:41 AM
Anonymous Post

Lynda, what you need for Student.DB is a meaningless key firld  -  "ID", a long integer type.  You can index the resulting database on other info such as "Family ID", another longInt.  That means you need a separate Famly.DB to control and define what THOSE meaningless ID fields mean.  Every book on database design will tell you that meaningless key fields are a first requirement.  Secondary indexes on names, classes, etc. will be fast and can control scrolling through forms if you like - im say Family order, or Class order, etc..  The sort of complex and meanngful key value you propose will be much larger thanva sim ple longInt, and will impair performance

---
Steve Caple
Posted 6 years ago
 Comment Quote

Post ID #15273 (Level 3) and Parent is 15271
 RE: {Too Long!} 12/10/2015 2:24:08 PM
Lynda.S
-- --

That sounds logical, I'll try it.  Thanks

Posted 6 years ago (Thread Starter)
 Comment Quote
 Visit Profile
Approved member.
Member subscribes to this thread with a verified email.

Post ID #15274 (Level 4) and Parent is 15271
Location=-- --
Joined=6 years ago   MB Posts=12
 RE: {Too Long!} 12/10/2015 4:24:59 PM
Lynda.S
-- --

I'm having difficulty getting the indexes to work.  I set up a form with the relevant parent fields and a table view for the child records. I need to be able to add a child record in this form and have it automatically add the meaningless key that will conect it to the parent. Do I need to make the ID autoincrement in parent and child or is there another way to get a random number so it can be atomatically filled in?

Posted 6 years ago (Thread Starter)
 Comment Quote
 Visit Profile
Approved member.
Member subscribes to this thread with a verified email.

Post ID #15275 (Level 5) and Parent is 15271
Location=-- --
Joined=6 years ago   MB Posts=12
 RE: {Too Long!} 12/10/2015 5:26:40 PM
Anonymous Post

In the Paradox KnowledgeBase, under Interactive Paradox:Forms, look for KB101042, "Paradox Forms from Scratch"  -  it's a good approach not just for interactove Pdox but for forms you'll program later or right away;  I'd avoid the built-in "experts"

#### KB101042i

---
Steve Caple
Posted 6 years ago
 Comment Quote

Post ID #15276 (Level 6) and Parent is 15271
 RE: {Too Long!} 12/10/2015 9:54:04 PM
Lynda.S
-- --

That helped, I tried searching for help but I didn't know what search terms to use. I created a form with 2 tables like the article said. I was able to put the fields from the parent table on the form, but when I added the grid for the child table, both tables were present but grayed out in the define record window. I tried different things, like deleting all objects and adding them in different ways until I was finally able to get the table and the parent fields on the form.  When I ran the form it wouldn't change to a new parent record. I temporiraly went back to the "expert" generated form while I learn more about making forms.

Posted 6 years ago (Thread Starter)
 Comment Quote
 Visit Profile
Approved member.
Member subscribes to this thread with a verified email.

Post ID #15277 (Level 7) and Parent is 15271
Location=-- --
Joined=6 years ago   MB Posts=12
 RE: {Too Long!} 12/10/2015 10:05:52 PM
Lynda.S
-- --

Now I need more info on how & where to concatenate fields such as first and last name. I don't need it to be stored in the parent table, but I need it to store in the child table to be used as an index.

Posted 6 years ago (Thread Starter)
 Comment Quote
 Visit Profile
Approved member.
Member subscribes to this thread with a verified email.

Post ID #15278 (Level 8) and Parent is 15271
Location=-- --
Joined=6 years ago   MB Posts=12
 RE: {Too Long!} 12/11/2015 4:04:43 AM
Steve Caple
Steve Caple Company
Sacramento, CA

I seem to have lost a reply I started; here goes again (if you see some dupe info).

Carefully go over the info on creating multi field sedomdary indexes, then in the Be Your Own Expert ("BYOE" henceforth), pay close attention to the example of data model linking.

Yyou may want to download the table structure listing utility STRULIST I shared (in the knowledge base at Paradox KB: Paradox & ObjectPAL, Item 17 under Paradox Tables) and print reports to PDF from that and share them.  (CutePDF is a free download that still works fine for me under Win 8.1)

Gotta go hack and cough  -  bad cold keeping me up so I figured I might as well answer the Paradox Forum email here even if it is O Dark Thirty

PS  -  don't despair  -  you've got the best tool for what you want to do  -  I've tried creating complexly linked forms on Access and thing I could do eaasily in Paradox were difficult or impossible.  Paradox form creation is very powerful IF you get the basics of data base design right going in.  You can do a lot without ObjectPAL, and with a little programming, then the potential is out of sight.

More people have problems from table structures than anything else in my experience  -  retired now, but used paradox and supported it (Sacramento Paradox Users Group, Borland Team B, Corel C-Tech) from the mid-80s, so close to 30 years

Steve Caple
Programmer Analyst
Prestwood Software
http://www.prestwood.com

Posted 6 years ago
 Comment Quote
 Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
 Web Presence Hidden. Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Steve Caple I first saw Paradox in 1985 when a guy named Rick Albers came to demo Ansa's new 1.1 release to the Sacramento PC Users Group. The feeling was like going from WordStar to WordPerfect 3.0, a sense of freedom and power.

A long time dBase user had an evaluation copy he let me use for a few weeks.  Going from dBase to Paradox was like finding yourself walking WITHOUT your shoe laces tied together.  I was hooked; within a week I wrote my first useful Paradox DOS program.  It took a few evenings to put together a script to  generate a Basic Bulk Mail sort,  using a series of Paradox queries against a bicycle club Century ride mailing list.  It then used PAL to send text to the printer, printing it out in 5 digit Zip, three digit Zip, and miscellaneous by state groups, including group header labels and spacers on one-across stock  -  just tear it apart at the headers and give it to the mailing volunteers, and a job that used to take 20 people 4 or 5 hours could be done by 5 or 6 in a single hour.

Later, Paradox for Windows version 5 added many needed structural and indexing and linking features, and as hardware caught up with the needs of a GUI environment it became a powerful database for small companies and divisions or branches within large corporations.  Despite some years of no real changes it remains one of the best products for that purpose.

Post ID #15279 (Level 9) and Parent is 15271
Location=Sacramento, CA
Joined=17 years ago   MB Posts=71   KB Posts=3
 RE: {Too Long!} 12/11/2015 6:34:31 AM
Lynda.S
-- --

I prayed for you.

When I try to open the report it says unknown alias.  What alias do I use?

I know basically what I want to be able to do with this database. I programmed this database on my Palm for my personal use a few years ago. It was pretty sophisitcated programming using multiple databses and various ways of interacting with each other (1-m, m-m, look up, etc). That was for my personal use when I was a coordinator. Now I'm trying to set it up for use by the current coordinator at church, also the database app I used on the Palm is no longer supported and was not ported to Android. I haven't found Android database app that is as sophosticated as that one was.

Posted 6 years ago (Thread Starter)
 Comment Quote
 Visit Profile
Approved member.
Member subscribes to this thread with a verified email.

Post ID #15280 (Level 10) and Parent is 15271
Location=-- --
Joined=6 years ago   MB Posts=12
 RE: {Too Long!} 12/12/2015 5:47:47 AM
Lynda.S
-- --

I think Workbench may solve my previous question, but I'm a little confused. Even though WordPerfect is x7, Paradox is still 11 - is that correct? Where do I get the correct version of Work bench for the current Paradox version?

Posted 6 years ago (Thread Starter)
 Comment Quote
 Visit Profile
Approved member.
Member subscribes to this thread with a verified email.

Post ID #15281 (Level 11) and Parent is 15271
Location=-- --
Joined=6 years ago   MB Posts=12
 RE: {Too Long!} 12/12/2015 8:45:13 AM
Steve Caple
Steve Caple Company
Sacramento, CA

I assume that "When I try to open the report" means the STRULIST report.  I Checked the KN download and didn't find a README.TXT file with instructions; I'll have to find the archive HD I have that on here.  But do create a public alias called STRULIST that points to the STRULIST directory.

I have - and had -  no experienc with Workbench.  Perhaps my experience of the general failings of the "experts" led me to ignore it.  If you want to try it, you might post

"Even though WordPerfect is x7, Paradox is still 11 - is that correct? Where do I get the correct version of Work bench for the current Paradox version?"

as a separate general question.

Steve Caple
Programmer Analyst
Prestwood Software
http://www.prestwood.com

Posted 6 years ago
 Comment Quote
 Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
 Web Presence Hidden. Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Steve Caple I first saw Paradox in 1985 when a guy named Rick Albers came to demo Ansa's new 1.1 release to the Sacramento PC Users Group. The feeling was like going from WordStar to WordPerfect 3.0, a sense of freedom and power.

A long time dBase user had an evaluation copy he let me use for a few weeks.  Going from dBase to Paradox was like finding yourself walking WITHOUT your shoe laces tied together.  I was hooked; within a week I wrote my first useful Paradox DOS program.  It took a few evenings to put together a script to  generate a Basic Bulk Mail sort,  using a series of Paradox queries against a bicycle club Century ride mailing list.  It then used PAL to send text to the printer, printing it out in 5 digit Zip, three digit Zip, and miscellaneous by state groups, including group header labels and spacers on one-across stock  -  just tear it apart at the headers and give it to the mailing volunteers, and a job that used to take 20 people 4 or 5 hours could be done by 5 or 6 in a single hour.

Later, Paradox for Windows version 5 added many needed structural and indexing and linking features, and as hardware caught up with the needs of a GUI environment it became a powerful database for small companies and divisions or branches within large corporations.  Despite some years of no real changes it remains one of the best products for that purpose.

Post ID #15282 (Level 12) and Parent is 15271
Location=Sacramento, CA
Joined=17 years ago   MB Posts=71   KB Posts=3
 RE: {Too Long!} 12/12/2015 1:47:05 PM
Lynda.S
-- --

Yes I meant the STRULIST report.

I saw something that said Framework has a launcher for switching between different projects. I thought it might help because when I changed to the directory where I put STRULIST and loaded the Visual Designer, it still had the info for my project. Since you don't use Framework how do you set it up to switch between projects? At this point i think I need details because the way everything is set up is still a little confusing to me. Also, what is the basic routine you go through when you start a new project? What are the first things you do?

BTW, as I learn I'm trying to log info that might be put in the Knowledgebase under the title "Primer for Beginners" as a reference for getting answers to various aspects of developing an app in Paradox.

Posted 6 years ago (Thread Starter)
 Comment Quote
 Visit Profile
Approved member.
Member subscribes to this thread with a verified email.

Post ID #15283 (Level 13) and Parent is 15271
Location=-- --
Joined=6 years ago   MB Posts=12
 RE: {Too Long!} 12/12/2015 3:03:08 PM
Lynda.S
-- --

I saw a suggestion to store the data in separate location than the app files. That is something I always prefer to do. Does anything special need to be done to do this and make everything work together?

I created a new alias for STRULIST and pasted the directory path in, but when I tried to save the alias it wanted to save to the cfg file in my project directory. I tried exiting & reloading Paradox and it did the same thing. I don't want to overwrite my projects info with this one. How do I get it to save properly?

Posted 6 years ago (Thread Starter)
 Comment Quote
 Visit Profile
Approved member.
Member subscribes to this thread with a verified email.

Post ID #15284 (Level 14) and Parent is 15271
Location=-- --
Joined=6 years ago   MB Posts=12
 RE: {Too Long!} 12/12/2015 3:50:04 PM
Steve Caple
Steve Caple Company
Sacramento, CA

I don't believe it will overwrite your info, burt rather add to it.  But make a backup!

Steve Caple
Programmer Analyst
Prestwood Software
http://www.prestwood.com

Posted 6 years ago
 Comment Quote
 Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
 Web Presence Hidden. Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Steve Caple I first saw Paradox in 1985 when a guy named Rick Albers came to demo Ansa's new 1.1 release to the Sacramento PC Users Group. The feeling was like going from WordStar to WordPerfect 3.0, a sense of freedom and power.

A long time dBase user had an evaluation copy he let me use for a few weeks.  Going from dBase to Paradox was like finding yourself walking WITHOUT your shoe laces tied together.  I was hooked; within a week I wrote my first useful Paradox DOS program.  It took a few evenings to put together a script to  generate a Basic Bulk Mail sort,  using a series of Paradox queries against a bicycle club Century ride mailing list.  It then used PAL to send text to the printer, printing it out in 5 digit Zip, three digit Zip, and miscellaneous by state groups, including group header labels and spacers on one-across stock  -  just tear it apart at the headers and give it to the mailing volunteers, and a job that used to take 20 people 4 or 5 hours could be done by 5 or 6 in a single hour.

Later, Paradox for Windows version 5 added many needed structural and indexing and linking features, and as hardware caught up with the needs of a GUI environment it became a powerful database for small companies and divisions or branches within large corporations.  Despite some years of no real changes it remains one of the best products for that purpose.

Post ID #15285 (Level 15) and Parent is 15271
Location=Sacramento, CA
Joined=17 years ago   MB Posts=71   KB Posts=3
 RE: {Too Long!} 12/12/2015 2:55:11 PM
Steve Caple
Steve Caple Company
Sacramento, CA

First: here's an example of a start script  -  set up a shortcut to open Paradox in your project directory, using the project alias, and run a script like this one (very bare bones):

method run(var eventInfo Event)
var
app    application
fs        filesystem
f        form
endvar

app.minimize()

app.hide()

f.bringToTop()
else
endif

endmethod

note: you'll want to look into the command line switches start up codes) you use with Paradox  -  here's a sample from an address list database on  my wife's laptop:

You right click on a shortcut, choose Properties, and click the Shortcut tab, and modify the Target line with stuff like above. the -p sets the priv dir, -o sets the idapi.cfg location, -c starts with a clear desktop, -w sets the working dir, etc.  See Mike Prestwood's article "Paradox Command-Line Options", KB100307

Second, I've found the instruction text file that seems to be missing from the knowledge base.  I can email it to you, unless I find a way to post it to a public download area on the board (if there is one)  -  send me your email in the next messge.   You can use AT for the @ and DOT for the periods to make it resistant to mail bots.  In the meanwhile I'll send it Mike and ask him to get it in the KB file.

Steve Caple
Programmer Analyst
Prestwood Software
http://www.prestwood.com

Posted 6 years ago
 Comment Quote
 Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
 Web Presence Hidden. Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Steve Caple I first saw Paradox in 1985 when a guy named Rick Albers came to demo Ansa's new 1.1 release to the Sacramento PC Users Group. The feeling was like going from WordStar to WordPerfect 3.0, a sense of freedom and power.

A long time dBase user had an evaluation copy he let me use for a few weeks.  Going from dBase to Paradox was like finding yourself walking WITHOUT your shoe laces tied together.  I was hooked; within a week I wrote my first useful Paradox DOS program.  It took a few evenings to put together a script to  generate a Basic Bulk Mail sort,  using a series of Paradox queries against a bicycle club Century ride mailing list.  It then used PAL to send text to the printer, printing it out in 5 digit Zip, three digit Zip, and miscellaneous by state groups, including group header labels and spacers on one-across stock  -  just tear it apart at the headers and give it to the mailing volunteers, and a job that used to take 20 people 4 or 5 hours could be done by 5 or 6 in a single hour.

Later, Paradox for Windows version 5 added many needed structural and indexing and linking features, and as hardware caught up with the needs of a GUI environment it became a powerful database for small companies and divisions or branches within large corporations.  Despite some years of no real changes it remains one of the best products for that purpose.

Post ID #15286 (Level 16) and Parent is 15271
Location=Sacramento, CA
Joined=17 years ago   MB Posts=71   KB Posts=3
 RE: {Too Long!} 12/13/2015 4:11:46 PM
Lynda.S
-- --

biz22ta1  at  gmail

dot   com

The paradox help file system doesn't seem to have examples or screen shots, is there a digital version of the paradox manual even if it is for a previous version of paradox?

I have been looking at Mikes P9 Power programming book in the KB. Is there a way to get the rest of the book in a digital form? I would be willing to pay Mike some for it.

I got STRULIST to work. I haven't had a chance to study it, but it looks interesting. Through the command line I can switch between strulist and my project, but I still have to change it to the project alias. How do I specify the project alias in the command line?

I really appreciate all the help you are giving me.  Are you feeling any better?

Posted 6 years ago (Thread Starter)
 Comment Quote
 Visit Profile
Approved member.
Member subscribes to this thread with a verified email.

Post ID #15287 (Level 17) and Parent is 15271
Last Updated 12/15/2015 7:09:14 AM
Location=-- --
Joined=6 years ago   MB Posts=12
 RE: {Too Long!} 12/13/2015 5:09:24 PM
Lynda.S
-- --

There was mention in one of the articles about storing the tables in a separate folder. Do you have tell each file to store in the separate place or can it be automated so it happens behind the scenes?

Posted 6 years ago (Thread Starter)
 Comment Quote
 Visit Profile
Approved member.
Member subscribes to this thread with a verified email.

Post ID #15288 (Level 18) and Parent is 15271
Location=-- --
Joined=6 years ago   MB Posts=12
Most Recent Post
 RE: {Too Long!} 12/13/2015 7:56:36 PM
Steve Caple
Steve Caple Company
Sacramento, CA

Both questions revolve around learning to use aliaases.  STRULST should be public,  your project progran]m (and separate data, if you go that way) aliases woiuld usually be project aliases.

all these aliases can be set interactively at the start of a session.  You can run a script, wither manually of=r from the sommand line f a specialized sjortcut. rather thatn step through it each tme.

Pardon the brevity; still under this cold and haven't had a lot of sleep the past week.

Steve Caple
Programmer Analyst
Prestwood Software
http://www.prestwood.com

Posted 6 years ago
 Comment Quote
 Visit Profile
Approved member.
Member subscribes to this thread with a verified email.
 Web Presence Hidden. Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Steve Caple I first saw Paradox in 1985 when a guy named Rick Albers came to demo Ansa's new 1.1 release to the Sacramento PC Users Group. The feeling was like going from WordStar to WordPerfect 3.0, a sense of freedom and power.

A long time dBase user had an evaluation copy he let me use for a few weeks.  Going from dBase to Paradox was like finding yourself walking WITHOUT your shoe laces tied together.  I was hooked; within a week I wrote my first useful Paradox DOS program.  It took a few evenings to put together a script to  generate a Basic Bulk Mail sort,  using a series of Paradox queries against a bicycle club Century ride mailing list.  It then used PAL to send text to the printer, printing it out in 5 digit Zip, three digit Zip, and miscellaneous by state groups, including group header labels and spacers on one-across stock  -  just tear it apart at the headers and give it to the mailing volunteers, and a job that used to take 20 people 4 or 5 hours could be done by 5 or 6 in a single hour.

Later, Paradox for Windows version 5 added many needed structural and indexing and linking features, and as hardware caught up with the needs of a GUI environment it became a powerful database for small companies and divisions or branches within large corporations.  Despite some years of no real changes it remains one of the best products for that purpose.

Post ID #15289 (Level 19) and Parent is 15271
Location=Sacramento, CA
Joined=17 years ago   MB Posts=71   KB Posts=3