--- Kevin Toppenberg <[EMAIL PROTECTED]> wrote:

> I always stumble at the point of using IENS.  No offense to Toad, but
> the system drives me crazy!
> 
> I want to add new records to a given file via UPDATE^DIE.  But I want
> to specify the record number.  So I set up an FDA that looks like
> this:
> 
> FDA(2706.3,"1,",.01)="My Name"
> FDA(2706.3,"1,",1)="Kevin"
> FDA(2706.3,"1,",2)="Toppenberg"
> (to stuff data into record/IEN# 1)
> 
> But when I do this, I get back an error message that "Record doesn't
> exist).

That means that the record with an IEN of 1 doesn't exist. An IENS in
this form is only used to edit existing records.
> 
> When I look at the documentation for IENS in the Fileman programmers
> manual, its not clear.  At one point it states that an IENS is a
> comma-delimited set of records numbers (IEN's).  Then it also
> describes using place holders, such as "+1",  "?1", or "?+1" for
> looking for preexisting records.

If you're adding a record, you need to use a placeholder for the IEN.
So, if you're adding a record at the top level, the IENS would be
"+1,". Note that this 1 has nothing to do with an IEN of 1, it simply
identifies the placeholder. If you mean to add an entry to a subfile,
then you might have an IENS of "?1,+2,". In this case, the ?1 means
search for a top level entry matching the values specified in your FDA
array, then add an entry (+2) to the subfile. Pieces of an IENS that
refer to different internal entry numbers need to be have different
numbers, and they need to be assigned sequentially. (I stumbled over
that one.) If you want the effect of LAYGO (adding an entry if it isn't
already there), you need "?+1,".
> 
> If the above FDA was
> FDA(2706.3,"+1,",.01)="My Name"
> FDA(2706.3,"+1,",1)="Kevin"
> FDA(2706.3,"+1,",2)="Toppenberg"
> 
> it work, but it would just add the record to the end of the list.
> 
> How do I specify to put a new record into the number that I want?
> 

I don't know any easy way. One possibility is to create a new stub
record and update it. Of course, if there's a .001 field, you can use
it.

> Thanks
> Kevin
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through
> log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD
> SPLUNK!
> http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
> _______________________________________________
> Hardhats-members mailing list
> Hardhats-members@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/hardhats-members
> 


===
Gregory Woodhouse  <[EMAIL PROTECTED]>
"Interaction is the mind-body problem of computing."
--Philip L. Wadler


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Hardhats-members mailing list
Hardhats-members@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hardhats-members

Reply via email to