OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Auto filling fields

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base
View previous topic :: View next topic  
Author Message
spaceghost43201
Newbie
Newbie


Joined: 01 Sep 2010
Posts: 3

PostPosted: Wed Sep 01, 2010 2:57 pm    Post subject: Auto filling fields Reply with quote

I'm sure that this question has been asked but I've googled it and searched the forum and can't find it anywhere. Perhaps I'm using the wrong keywords since I'm new and don't know all the terminology.

I would like my form to auto complete. I would like to be able to select a unique ID number (such as a patient ID) from a drop down list and have the remaining relevent fields (such as name, address, phone number) be filled in automaticly thereby eliminating input errors from multiple users who may misspell or just make a mistake.

If you could answer the question or link me to the already answered question, it would be greatly appreciated.
Back to top
View user's profile Send private message
RPG
Super User
Super User


Joined: 24 Apr 2008
Posts: 2697
Location: Apeldoorn, Netherland

PostPosted: Wed Sep 01, 2010 3:25 pm    Post subject: Reply with quote

Hello

Maybe this link can help you.

And this link also.
There is an example of Arineckaig for selecting data.

Romke
Back to top
View user's profile Send private message
spaceghost43201
Newbie
Newbie


Joined: 01 Sep 2010
Posts: 3

PostPosted: Thu Sep 02, 2010 6:42 pm    Post subject: Reply with quote

The tripple filter example with the permanent filter seems to be what i need except that I want to be able to choose from a list box and have the rest of the fields auto-fill and I only need one filter instead of 3. I tried to re-create what was done but it never seemed to work out for me. The best I could get was to select an item from a list box and have that word populate the rest of the fields instead of the info that corresponds to the item i selected.
Back to top
View user's profile Send private message
Arineckaig
OOo Advocate
OOo Advocate


Joined: 01 Mar 2004
Posts: 358

PostPosted: Fri Sep 03, 2010 1:37 pm    Post subject: Reply with quote

Quote:
I want to be able to choose from a list box and have the rest of the fields auto-fill and I only need one filter

The Base file to which you were referred was a scratch initial example and the explanation was concerned with only part of the examples shown. I recognise how frustrating this must be when you have only part of the story. Provided you treat this document as a first rough draft that requires much further editing, it will hopefully give you the background to the 'permanent filter' approach.

In your particular case I suggest the "Indexing example" on page 4 [now page 11 - see edit below] is what you may be looking for. I have added an example of this form document to a revised version of the Base file that you will still find together with an explanation document at
http://dl.dropbox.com/u/10552709/FilterExamples.zip
Given time I hope to complete drafting the explanation, but meantime hope that this inadequate stop gap may relieve a degree of the frustration I have caused for which I can only apologise..

LATER EDIT: I will be updating and revising the two download files listed in this post from time to time as I try to improve the explanation PDF or add examples to the zipped Base .odb file.
7 Sep EDIT The initial draft of the explanatory document is now completed. It can be downloaded (750K) zipped together with the ExampleDatabase file from the site:
http://dl.dropbox.com/u/10552709/FilterExamples.zip


Last edited by Arineckaig on Tue Sep 07, 2010 4:52 am; edited 4 times in total
Back to top
View user's profile Send private message
spaceghost43201
Newbie
Newbie


Joined: 01 Sep 2010
Posts: 3

PostPosted: Fri Sep 03, 2010 6:28 pm    Post subject: Reply with quote

I've made some good progress thanks to you, but I'm not quite where I want to be yet. I've been working with your data to try to replicate your results. I have been able to get the fields to auto-fill which may have been because I was trying to use a list box for my main form. I believe that I have correctly made your indexing form. The only difference is that my form navigator says mainform -> mainform_grid -> subform. I would like for the month to auto-fill like in the filtering example, not the month ID like in the indexing example.
Back to top
View user's profile Send private message
Arineckaig
OOo Advocate
OOo Advocate


Joined: 01 Mar 2004
Posts: 358

PostPosted: Sat Sep 04, 2010 12:20 am    Post subject: Reply with quote

Quote:
I would like for the month to auto-fill like in the filtering example, not the month ID like in the indexing example.

I much regret it but this is my fault for posting an explanation that has yet to be completed. You will see the last sentence on page 6 of the explanation touches on this issue:

"List boxes are used again in this form to display user friendly names rather than IDs as they were in the superior forms".

In OOo Base a common use for a List Box is to display one field (which can even be from a different table) while a selection from that box is bound to a different field. I suggest you examine the various List box form controls in the .odb example's "3. Triple filter" form document. In particular, look at the "lbMONTH" List box in the lowest sub-form, "SubForm". The Data tab of its Properties dialog shows:

Data field: MONTH_ID
Type of list contents: Sql
List content: SELECT "MONTH", "ID" FROM "MONTHS" AS "MONTHS"
ORDER BY "ID" ASC
Bound field: 1

The effect is that the first field in the SELECT statement is displayed but it is the second field that is bound to the data source of the data form. The Bound field property is shown a '1' because the field indexing starts at 0.

If you look also at the top data form, "Month", you will see the grid/table form control has a single column that is again a List box whose label is 'Select month'. The data tab properties for this List box are much the same. The difference in SQL list content is not significant:
SELECT DISTINCT "MONTH", "M"."ID" FROM "MONTHS" AS "M"
ORDER BY "ID" ASC

I hope this gives you enough to work on until I get around to completing the "explanation" document.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot 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


Powered by phpBB © 2001, 2005 phpBB Group