Kevin I would recommend that you go to this page: http://www.va.gov/vdl/Infrastructure.asp?appID=5
And get the "VA FileMan Key and Index Tutorial". That is what I use. --Skip -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kevin Toppenberg Sent: Wednesday, September 08, 2004 11:56 AM To: [EMAIL PROTECTED] Subject: Re: [Hardhats-members] Adding records with multiples Where do I learn more about how to use KEYS? Thanks Kevin --- Greg Kreis <[EMAIL PROTECTED]> wrote: > I like Skip's idea as well. Perhaps KEYS are right on the money for > your goal. > > Greg Kreis wrote: > > > If you want more control that ?+, you could do > your own retrievals > > into the multiple with a DBS call, apply your > logic and then use the > > IENs returned by the lookup to set the IENS for > the updater... > > > > Good luck! > > > > Kevin Toppenberg wrote: > > > >>Greg, > >> > >>Thanks for your reply. > >> > >>I want to be able to run my script, and then--if needed--run it > >>again, without it adding new > entries > >>each time. So sometimes I will be adding records, > and > >>sometimes stuffing old ones. > >> > >>I think the specier "?+" will cover this > situation. > >>The only limitation of this is that I think it > only > >>uses the ".01" field when searching for a > pre-existing > >>record. I wanted to have my script be more > flexible > >>than that. > >> > >>I think I will be able to use what you have told > me to > >>come up with a solution. I'll ask more later if I need. > >> > >>Thanks again > >>Kevin > >> > >> > >>--- Greg Kreis <[EMAIL PROTECTED]> wrote: > >> > >> > >> > >>>The 2 is the IEN in the multiple. You don't want > to > >>>encode the literal > >>>IENm, as you adding values, not accessing > existing > >>>ones. Instead, look > >>>into the 'extended IENS' concepts of + and ?. The use of + requests > >>>a record to be added in the multiple and the ? > permits > >>>the value to be > >>>'found' before deciding to add (if the + > accompanies > >>>it). While > >>>simplistic, this lets you avoid duplicating > entries. > >>> > >>>So you might use an IENS of '+9,250' where the > 250 > >>>is IEN 250 in the > >>>main file and +9 means you are requesting the addition of an entry > >>>in the multiple. I used 9 to indicate it is just a placeholder and > >>>is only needed if you want to discover the IEN that was created for > >>>the new entry in the multiple (the 9 is a subscript in a returned > >>>array of assigned IENs). > >>> > >>>Kevin Toppenberg wrote: > >>> > >>> > >>> > >>>>I am trying to wrap my mind around adding data > with > >>>>multiples. I wonder if someone can help me. > >>>> > >>>>My goal is to enable my scripting system to > process > >>>>the following request: > >>>> > >>>> <File id="TestMenu" File="OPTION"> > >>>> <Field id="NAME">TestMenu</Field> > >>>> <Field id="MENU TEXT">Test2</Field> > >>>> <Field id="CREATOR">Dodd,Norman"</Field> > >>>> <Field id="Short Menu Text">Some Short > >>>> > >>>> > >>>Text</Field> > >>> > >>> > >>>> <Field id="DELEGABLE">YES</Field> > >>>> <Field id="TYPE">menu</Field> > >>>> <Field id="MENU/.01">DIUSER</Field> > >>>> <Field id="MENU/SYNONYM">FM2</Field> > >>>> <Field id="MENU/DISPLAY ORDER">1</Field> > >>>> <Field id="MENU/.01">XMMGR</Field> > >>>> <Field id="MENU/SYNONYM">X2</Field> > >>>> <Field id="MENU/DISPLAY ORDER">1</Field> </File> > >>>> > >>>>I parse the above into the following structure, > >>>> > >>>> > >>>with > >>> > >>> > >>>>this format: > >>>> > >>>> > >>>Data(EntryNumber,FieldNum,[SubEntryNumber,FieldNumber]) > >>> > >>> > >>>>Data(0,"Entries")=7 > >>>>Data(0,"File")=19 > >>>>Data(0,"File","Global")="^DIC(19," > >>>>Data(1,.01)="TestMenu" > >>>>Data(1,.01,"MatchThis")=1 > >>>>Data(2,1)="Test2" > >>>>Data(3,3.6)="Dodd,Norman""" > >>>>Data(4,10.1)="Some Short Text" > >>>>Data(5,13)="YES" > >>>>Data(6,4)="menu" > >>>>Data(7,10,0,"Entries")=2 > >>>>Data(7,10,0,"File")=19.01 > >>>>Data(7,10,1,.01)="DIUSER" > >>>>Data(7,10,1,.01,"MatchThis")=1 > >>>>Data(7,10,1,2)="FM2" > >>>>Data(7,10,1,3)=1 > >>>>Data(7,10,2,.01)="XMMGR" > >>>>Data(7,10,2,.01,"MatchThis")=1 > >>>>Data(7,10,2,2)="X2" > >>>>Data(7,10,2,3)=1 > >>>> > >>>> > >>>>I am able to work with the standard > >>>> > >>>> > >>>("non-multiple") > >>> > >>> > >>>>fields without any problem. I use FILE^DIE to > >>>> > >>>> > >>>stuff a > >>> > >>> > >>>>pre-existing record with the data that I want, > or I > >>>>use UPDATE^DIE if I need to create a new record. > I > >>>> > >>>> > >>>do > >>> > >>> > >>>>a search for pre-existing data based on the "MatchThis" entries, > >>>>and get an IEN (internal > entry > >>>>number) of the record to work with. > >>>> > >>>>But now I am working to get the sub-file part > >>>> > >>>> > >>>working. > >>> > >>> > >>>>I don't know how to get the IEN of the subfile entries. > >>>> > >>>>In the above example, I am working with the > OPTION > >>>>file. Field MENU(#10) is a multiple, meaning > that > >>>>when I add data to that field, the database > really > >>>>holds a list of 'pointers' to entries in another > >>>> > >>>> > >>>file. > >>> > >>> > >>>>I.e. the MENU sub file number is 19.01. So If I > >>>> > >>>> > >>>have > >>> > >>> > >>>>2 'multiple' entries in field 10, then field 10 > === message truncated === __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click _______________________________________________ Hardhats-members mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hardhats-members ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_idP47&alloc_id808&op=click _______________________________________________ Hardhats-members mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hardhats-members