Page Index Toggle Pages: [1] 2  Send Topic Send Topic Print Print
Hot Topic (More than 10 Replies) Trying to Understand Form and Subform (Read 2300 times)
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Trying to Understand Form and Subform
Jan 30th, 2004 at 1:02am
Print Post Print Post  
Coming from Q&A background, Form and Subform concept is totally new to me. Bob Scott has showed me various possiblities, applicability and got me interested conceptually.  I studies the reference materials and trying to put them into action once I understand them fully well.

Form and Subform together are viewed to look at certain data. So first you have to gather the data either by import or copying with proper fields (atleast one for the main form and others are for SubForm) and for Natural linking they have to be in proper sorted before import. 

One has to update this data regularly and keep them in proper order before even getting them in the Form-Subform elements especially if the data are not entered through this Form-Subform.  I am referring here for natural link, that is supposed to be preferred and faster method.

Bob Scott is an expert and very fond of Subform and Tab Pages and I know, I have to learn a lot from all of you out there. So, please enlighten me on this subject particularly as to how to gather data.  Please correct me and help me crystalize my understanding.  I believe this subject will be of great interest to many of us here. Thanks.
  
Back to top
 
IP Logged
 
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: Trying to Understand Form and Subform
Reply #1 - Jan 30th, 2004 at 5:18am
Print Post Print Post  
Bharat_Naik,

You are correct that I am fond of tabs and subforms but I am far, real far from an expert. I find that Tabs and subforms gives the application a form of simplicity for the end user. For example the most basic things like phone numbers that normally take up screen space for home phone, work phone, cell phone, fax etc now can all be neatly placed in one little place so the user can always quickly find the phone section of the form and click a tab to display the specific number they need. With a little effort it is easy to change the text color on the tab and the text color of the specific field element so each phone number is a separate color. This may seem very low tech but to an end user this is a valuable feature.

In the case of subforms I will explain what I have found from my experience after many hours of playing with them. I will hope that a Lantican will  respond with technical specifics or correct my wrong assumptions.

The big issue I keep hearing mentioned is how to maintain the links between the subforms. Or what has to be done to update this data regularly.

Well the short answer I can give is nothing. I have found that Sesame makes it effortless to maintain these subform links. First the natural link method does it all for you. You just enter the data in the subform save the record and low and behold every time you retrieve the record in the main form the subrecord data is retrieved at the same time.

A real neat thing  Sesame does is that when you run your search from the main form the counter shows you what record you are in and how many records it found, when you click on an element in any subform it immediately shows you how many records are in the subform and what record you are in. So a simple example is if I search my  main form for a last name of  Smith the sesame counter shows me I am in record 1 of 35. (35 different Smiths) I of course can use Tableview and see all 35 records. But if I click an element on my subform for invoices it shows me I am in record 1 of 6. Which is the 6 invoices relating to the first record  of my 35 smiths. Even cooler is now I have another subform that is displaying the line items associated with that particular invoice when I clicked in an element in that subform the counter showed me there were 19 items relating to the first of my 6 invoices for that first customer Smith. (just for the record this subform is a tableview so when I look at my screen I see the basic info of my customer and the total of all the outstanding invoices on the top. In the middle section my subform displays my invoice overall data like date, classification, status, total of that particular invoice  etc but the subform towards the bottom in tableview displays all the line item details. If I F10 to advance from the invoice subform the basic data in the main customer record remains the same (the first Smith) but the invoice data changes to the second of 6 and so does the line item detail in the lower subform advance  to the specific line items of invoice 2 of 6.

With Relational links everything is the same except we have to assign a relational key. All the relational key is  the element from the main or parent form that matches the element on the subform. Sesame even makes this really simple. When I create a subform element, 2 of the questions it asks me is Parent record Field (this is the name of the element on the main form that holds the data to match with the subform field) and Child Record field (this is the name of the element on the subform that holds the data that matches the main form) (page 149 of the user guide shows a good picture) Basically in my example above my cusnum element that is assigned using @number is matched with the Cusnum element in my subform invoices database and that brings up all  the invoices that match that number. Each separate invoice has a invnum  element that is a unique number to that specific invoice and that matches the Invnum element in the line items database subform so it brings up every line item that matches that number wich is all the line items associated with that specific invoice.  

The other big question people have asked is  how do I get my data I have now in QA to link together so subforms work. These are the steps I followed to take an existing QA database that was basically flat (all data per client in 1 record) and put them in a relationally keyed Sesame application with subforms working,

1. I took an old QA database that has all the data in 1 record and exported the Cusnumber and any basic data that  I wanted to be in the main database to a file and import this to my main database

2. I took the same database but this time I exported the Cusnumber and the invoice number and the basic invoice fields to a file and imported them into my invoice database

3. I took the same database again this time I exported the Cusnumber and invoice number and line item detail fields and imported them into my line items database.
With these 3 files imported into sesame I have all the data linked together and displaying nicely on the subforms.

From what I have read there is not any reindexing needed in sesame so I can continue to work on the application and  not have to worry about the data.

I know this explanation got long and confusing but this should give anyone that desires to use subforms the basic direction to head into. It should also let new users know that they should not fear subforms and tabs. I am able to use them and I am not a computer guru, I am just like many of us out here, just trying to find how we can best utilize Sesame for our own jobs and businesses.



  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Trying to Understand Form and Subform
Reply #2 - Jan 30th, 2004 at 11:50am
Print Post Print Post  
Bob, Thank you very much indeed. This will make a lot of people start thinking about these two tools in the form of tab pages and subform and start incorporating them in their applications.

For me, I will have to read your direction again and again, not because it is not clear but there is so much to digest and so much information put together. I may have to ask some question as I get to understand the concept a little better. Thanks again.
  
Back to top
 
IP Logged
 
josebetzy
Member
*
Offline


Hmmm. How? Cómo?

Posts: 33
Location: Las Piedras, Puerto Rico
Joined: Dec 15th, 2003
Re: Trying to Understand Form and Subform
Reply #3 - Jan 31st, 2004 at 8:18pm
Print Post Print Post  
I had hoped that example applications such as you describe would have been included. Sometimes it is easier to see than to read. I hope Lantica offers them for downloading sometime soon.  Some of these concepts take time to understand and visualize. A great help would be to see the obvious power Sesame has to an application with many features working. Hope someone reads and listens and reacts.
  

Jose L. Muñoz
Back to top
 
IP Logged
 
Alec
Lanticans
*****
Offline



Posts: 200
Location: Ascot, England, UK
Joined: Nov 22nd, 2002
Re: Trying to Understand Form and Subform
Reply #4 - Jan 31st, 2004 at 9:46pm
Print Post Print Post  
Quote:
I had hoped that example applications such as you describe would have been included.

- There are two main form / subform applications supplied.  They are COUNTRIES.db, which has a table view subform, and GEMS.db which has a form view subform. They can be found in the SAMPLES folder.

These illustrate what natural-linking subforms are about. You can have more fields in the main form, or in the subform; you can have multiple subforms; you can have more complicated-looking subform applications; but the principles are the same.

What further would help you?

Would you like me to show you how you would take a flat file - like a spreadsheet - of cities in various countries, and import it into Sesame as a main/subform database like COUNTRIES?
  

Alec
Back to top
IP Logged
 
josebetzy
Member
*
Offline


Hmmm. How? Cómo?

Posts: 33
Location: Las Piedras, Puerto Rico
Joined: Dec 15th, 2003
Re: Trying to Understand Form and Subform
Reply #5 - Feb 1st, 2004 at 1:52am
Print Post Print Post  
Yes.  This is probably, for me at least, what most would help me understand this concept and transition.

Q2: I have installed the 1.0.1 upgrade for Sesame, but I still continue to get small print when using the Print Command from the tree structure.  Know whats going on?
  

Jose L. Muñoz
Back to top
 
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Trying to Understand Form and Subform
Reply #6 - Feb 2nd, 2004 at 6:18pm
Print Post Print Post  
Tab-Forms is a good tool to organize the elements and can easily be incoprorated into the form. I like them a lot.

As for Subform, It is a very useful tool for certain application.  Computer can only present the data that you have put in.  So, to have data presented to you, you first have to enter the data. Subform with Natural automatic link is good for presenting data if the data is entered using the same form and subform.  Re-Parenting with Natural link is not possible.  Hierarchiacal import is possible if you import element of a main form and elements of subforms. Yes, you may import data initially that way but to do that on ongoing basis will be a real pain.

So, one has to decide first, that they just want to have the data presented to them for analysis or they also need to enter data and work with that form dyanamically.  If you want to have later, your obvious choice is Subform but if you just want to have data presented for Analysis, just have a report displayed from the data already entered somewhere by somebody in any form of the application.  Simple button will make the report and present that to you.

I am still experimenting and working weighing as to what to use and where.  Say for scheduling, I am looking at the data and making appointment at the same time, subform will be my obvious choice.  If I am looking at the history of visits of particular patient, report will be sufficient.

I still think, my understanding of Form Subform is limited and still need to explore its hidden power behind all that complexity.
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Trying to Understand Form and Subform
Reply #7 - Feb 2nd, 2004 at 8:40pm
Print Post Print Post  
Quote:
Q2: I have installed the 1.0.1 upgrade for Sesame, but I still continue to get small print when using the Print Command from the tree structure.  Know whats going on?


I looked up all of your posts to see what the original printing problem was. Earlier you said that it was printing small and in the middle of the page. Is that still the case?

When you say small, how small do you mean? Is it the size of a postage stamp or a few inches tall/wide?
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Alec
Lanticans
*****
Offline



Posts: 200
Location: Ascot, England, UK
Joined: Nov 22nd, 2002
Re: Trying to Understand Form and Subform
Reply #8 - Feb 3rd, 2004 at 12:11am
Print Post Print Post  
A couple of days ago I said I would give you an example of taking flat-file databases and bringing them into Sesame. I see that Bob Scott has described basically how you would do so using relational linking. I'd like to do the same using natural linking. Give me a little more time to prepare this: I want to show you the easiest possible way, and it's a "tea-break" task!
  

Alec
Back to top
IP Logged
 
josebetzy
Member
*
Offline


Hmmm. How? Cómo?

Posts: 33
Location: Las Piedras, Puerto Rico
Joined: Dec 15th, 2003
Re: Trying to Understand Form and Subform
Reply #9 - Feb 3rd, 2004 at 3:07am
Print Post Print Post  
Mark:
It prints in the middle of the page about 2 1/2 inches wide but completely tall (9 inches). What I need is how to stretch it out sideways. 

Alec:
Yes, you are right. Actually BOBSCOTT and Bharat_Naik have helped me, especially when to use them and what type of linking for the particular case.

When I say you are right, I am referring to the countries and gems Db's. I'm sorry to say that I looked at them but I did not see them. I missed the boat and the water. Maybe those Puerto Rican cigars have more than tabacco in them, and they are small in size.

I need to experiment more with the data and applications on hand. I am trying to rush things to quickly.  I have said this before, Sesame has more than I bargained for or even expected. There is a misconception that Sesame is or was going to be QA 6.0. How wrong and far from the truth. There is a lot to learn, power to spare and lots of fun designing for a 1.0 version of a product. 

So Alec take your time and again thank you.

  

Jose L. Muñoz
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Trying to Understand Form and Subform
Reply #10 - Feb 3rd, 2004 at 1:40pm
Print Post Print Post  
Quote:
Mark:
It prints in the middle of the page about 2 1/2 inches wide but completely tall (9 inches). What I need is how to stretch it out sideways.   


Is the form very tall and narrow? Print form will not change the proportions of the form, so to make a very tall narrow form fit on one page, it has to make it very narrow to keep the same proportions as the form on the screen.

If you have a form that is 1200 pixels tall and 600 pixels wide, it will attempt to print it approximately 9 inches tall by 4 1/2 inches wide. If the form is 1600 pixels tall and still 400 wide - it will print 9 inches tall by 2 1/4 inches wide.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
GW
Junior Member
**
Offline


No personal text

Posts: 83
Joined: Dec 16th, 2003
Re: Trying to Understand Form and Subform
Reply #11 - Feb 3rd, 2004 at 4:04pm
Print Post Print Post  
Quote:
On the main form the @FormResultSetTotal progamming in the "SubTotal" element works fine but a simple mathematical operator of Amount = Price * Qty0 in "on element exit" of "Price" in the SubForm has given mixed results.
Never seems to work in the first line item and appears to be spasmodic of when it  works at all in the other line items.

I posted this about a week ago and since then have worked on this off and on but the results are still the same. Is there a bug in programing within subforms? or is there more to the process that I'm missing.

Bob I believe you had a similar problem, did you get anything to work apart from manual entry in the subform?
  
Back to top
 
IP Logged
 
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: Trying to Understand Form and Subform
Reply #12 - Feb 3rd, 2004 at 4:29pm
Print Post Print Post  
Becky,

I am still experiencing the same problems. I actually have sporadic results on many on element exit commands. It is the most obvious to me when I exit the qty  and it should multiply the qty times the price and update the line item total element and it is the most frustrating when I am expecting a selection box to activate when exiting a field and nothing happens. I can go back and exit again and again sometimes it works other times it does not. I have the same results from a simple database or a subform.

I have not been able to detect any repeatable pattern to identify if the problem is self inflicted or with Sesame. But I keep looking.

Keep us posted, I will do the same.
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Trying to Understand Form and Subform
Reply #13 - Feb 3rd, 2004 at 5:08pm
Print Post Print Post  
There are a number of fixes going in 1.0.2 for subform (especially subform-tableview) programming.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
GW
Junior Member
**
Offline


No personal text

Posts: 83
Joined: Dec 16th, 2003
Re: Trying to Understand Form and Subform
Reply #14 - Feb 3rd, 2004 at 8:41pm
Print Post Print Post  
Mark, do I assume this is is not operator error  Grin and we should chill on programming to subforms until 1.0.2 is available?

Bob, I've been experiencing the same problems as you described but now Mark has stated they are working on this I won't waste anymore time on it, will come back to it when a fix is available Smiley
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send Topic Send Topic Print Print