dbTalk Databases Forums  

FMP6: Populating auto serial # field I just added to past records?

comp.databases.filemaker comp.databases.filemaker


Discuss FMP6: Populating auto serial # field I just added to past records? in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Cerulean
 
Posts: n/a

Default FMP6: Populating auto serial # field I just added to past records? - 12-15-2010 , 08:23 AM






I have a FMP6 db with over 2000 records. I didn't add an automatic
unique field identifier so now that I need one for the first time, is
there some way to have this new field automatically populated with
numbers? I have it set to unique contents only, etc., and then will
lock it out so users can't edit afterwards but it would be nice to
have a way to get those numbers in without my having to manually
number all 2000+ records.

Is there a way?

Thanks. D

Reply With Quote
  #2  
Old   
 
Posts: n/a

Default Re: FMP6: Populating auto serial # field I just added to past records? - 12-15-2010 , 12:37 PM






"Cerulean" schreef in bericht
news:9ljhg6l2hf4rr5mk1nbmieupt78ee24ju2 (AT) 4ax (DOT) com...

I have a FMP6 db with over 2000 records. I didn't add an automatic
unique field identifier so now that I need one for the first time, is
there some way to have this new field automatically populated with
numbers? I have it set to unique contents only, etc., and then will
lock it out so users can't edit afterwards but it would be nice to
have a way to get those numbers in without my having to manually
number all 2000+ records.

Is there a way?

Thanks. D

It is the most easy if you haven't used the field for any relationships yet.

Put the field on a layout and make sure you can enter it when browsing
find all records
key CTRL-= (on windows)
You get a new window (replace field contents)
select the second option (replace with serial numbers)
initial value 1 (or 0000001 or MyID000001 or whatever you need)
Increment by 1
select update serial number
click replace

Be aware: this is a very powerfull option! Make sure you have entered all
values as wanted AND i would advice to work on a copy of your file.

If you already have some sort of relationship defined you must leave out
those records, count them and start the initial value at count+1


Hou je goed / keep well,

Ursus

Reply With Quote
  #3  
Old   
Cerulean
 
Posts: n/a

Default Re: FMP6: Populating auto serial # field I just added to past records? - 12-15-2010 , 07:36 PM



On Wed, 15 Dec 2010 19:37:02 +0100, <Ursus> wrote:

Quote:
"Cerulean" schreef in bericht
news:9ljhg6l2hf4rr5mk1nbmieupt78ee24ju2 (AT) 4ax (DOT) com...

I have a FMP6 db with over 2000 records. I didn't add an automatic
unique field identifier so now that I need one for the first time, is
there some way to have this new field automatically populated with
numbers? I have it set to unique contents only, etc., and then will
lock it out so users can't edit afterwards but it would be nice to
have a way to get those numbers in without my having to manually
number all 2000+ records.

Is there a way?

Thanks. D

It is the most easy if you haven't used the field for any relationships yet.
No. No relationships, so that's good.

Quote:
Put the field on a layout and make sure you can enter it when browsing
find all records
key CTRL-= (on windows)
You get a new window (replace field contents)
select the second option (replace with serial numbers)
initial value 1 (or 0000001 or MyID000001 or whatever you need)
Increment by 1
select update serial number
click replace
I'm not I understood all this but will try it and follow the
instructions carefully.

Quote:
Be aware: this is a very powerfull option! Make sure you have entered all
values as wanted AND i would advice to work on a copy of your file.
Thanks. I backup the file after each session so I definitely am
conscious of that but thanks for the heads-up.

Quote:
If you already have some sort of relationship defined you must leave out
those records, count them and start the initial value at count+1


Hou je goed / keep well,

Ursus
Well, crossing fingers. Will report back.

Reply With Quote
  #4  
Old   
Cerulean
 
Posts: n/a

Default Re: FMP6: Populating auto serial # field I just added to past records? - 12-16-2010 , 05:49 AM



On Wed, 15 Dec 2010 19:37:02 +0100, <Ursus> wrote:

Quote:
"Cerulean" schreef in bericht
news:9ljhg6l2hf4rr5mk1nbmieupt78ee24ju2 (AT) 4ax (DOT) com...

I have a FMP6 db with over 2000 records. I didn't add an automatic
unique field identifier so now that I need one for the first time, is
there some way to have this new field automatically populated with
numbers? I have it set to unique contents only, etc., and then will
lock it out so users can't edit afterwards but it would be nice to
have a way to get those numbers in without my having to manually
number all 2000+ records.

Is there a way?

Thanks. D

It is the most easy if you haven't used the field for any relationships yet.
Check.

Quote:
Put the field on a layout and make sure you can enter it when browsing
Check.

Quote:
find all records
Can you believe I got stuck already? I know how to SHOW all records,
but find them? Is this possible in FMP6? I've gone through all the
menu pulldowns and even tried via a script but nothing. Can you
describe the process a bit more so that if it's a command from another
version of FMP, I can see if I can figure out how to do it. Googling
yielded no results either since it seems we always have to put
something in the find field. Putting in *.* of course didn't work
since it requires a number.

Quote:
key CTRL-= (on windows)
I didn't know here what you meant after CTRL. Is it CTRL + -, THEN
CTRL + = ? Neither yielded any discernible results, so not sure what
this is supposed to do.

Quote:
You get a new window (replace field contents)
select the second option (replace with serial numbers)
initial value 1 (or 0000001 or MyID000001 or whatever you need)
Increment by 1
select update serial number
click replace
I imagine that the rest will become clear once I enter the right
feature.

Sorry to get stuck right from the get-go, but I suspect that the
commands might be from a future version of FMP (??) so that is
probably why I couldn't figure it out.

Quote:
Be aware: this is a very powerfull option! Make sure you have entered all
values as wanted AND i would advice to work on a copy of your file.

If you already have some sort of relationship defined you must leave out
those records, count them and start the initial value at count+1


Hou je goed / keep well,

Ursus
Thanks! D

Reply With Quote
  #5  
Old   
Your Name
 
Posts: n/a

Default Re: FMP6: Populating auto serial # field I just added to past records? - 12-16-2010 , 02:19 PM



"Cerulean" <Spamming (AT) NOTallowed (DOT) com> wrote

Quote:
On Wed, 15 Dec 2010 19:37:02 +0100, <Ursus> wrote:

"Cerulean" schreef in bericht
news:9ljhg6l2hf4rr5mk1nbmieupt78ee24ju2 (AT) 4ax (DOT) com...

I have a FMP6 db with over 2000 records. I didn't add an automatic
unique field identifier so now that I need one for the first time, is
there some way to have this new field automatically populated with
numbers? I have it set to unique contents only, etc., and then will
lock it out so users can't edit afterwards but it would be nice to
have a way to get those numbers in without my having to manually
number all 2000+ records.

Is there a way?

Thanks. D

It is the most easy if you haven't used the field for any relationships
yet.

Check.

Put the field on a layout and make sure you can enter it when browsing

Check.

find all records

Can you believe I got stuck already? I know how to SHOW all records,
but find them? Is this possible in FMP6? I've gone through all the
menu pulldowns and even tried via a script but nothing. Can you
describe the process a bit more so that if it's a command from another
version of FMP, I can see if I can figure out how to do it. Googling
yielded no results either since it seems we always have to put
something in the find field. Putting in *.* of course didn't work
since it requires a number.
"Find All" and "Show All" is the same thing. From memory FileMaker changed
the wording at some stage. It simply means to make sure you have all the
records you want to change in the current Found Set.



Quote:
key CTRL-= (on windows)

I didn't know here what you meant after CTRL. Is it CTRL + -, THEN
CTRL + = ? Neither yielded any discernible results, so not sure what
this is supposed to do.
Hold down the CTRL key and press the = key ... but the keyboard shortcut may
have been changed in different versions of FileMaker. Instead, just go to
the Records menu and choose the Replace option, then continue with the rest
of Ursus' instructions.


Helpful Harry )

Reply With Quote
  #6  
Old   
 
Posts: n/a

Default Re: Populating auto serial # field I just added to past records? - 12-16-2010 , 05:40 PM



any discernible results, so not sure what
Quote:
this is supposed to do.

Hold down the CTRL key and press the = key ... but the keyboard shortcut
may
have been changed in different versions of FileMaker. Instead, just go to
the Records menu and choose the Replace option, then continue with the rest
of Ursus' instructions.

Except we left out that the cursor should be inside the field that is going
to be changed.

Ursus

Reply With Quote
  #7  
Old   
Your Name
 
Posts: n/a

Default Re: Populating auto serial # field I just added to past records? - 12-16-2010 , 11:36 PM



<Ursus> wrote

Quote:
any discernible results, so not sure what
this is supposed to do.

Hold down the CTRL key and press the = key ... but the keyboard shortcut
may have been changed in different versions of FileMaker. Instead, just
go to
the Records menu and choose the Replace option, then continue with the
rest
of Ursus' instructions.

Except we left out that the cursor should be inside the field that is
going
to be changed.
True, you do have to first click in the Field. I did think of that and then
forgot to add it. D'oh!

Helpful Harry )

Reply With Quote
  #8  
Old   
 
Posts: n/a

Default [OT] : Populating auto serial # field I just added to past records? - 12-17-2010 , 05:04 AM



Hou je goed / keep well,

Ursus
"Your Name" schreef in bericht news:ieesjb$up5$1 (AT) lust (DOT) ihug.co.nz...


<Ursus> wrote

Quote:
any discernible results, so not sure what
this is supposed to do.

Hold down the CTRL key and press the = key ... but the keyboard shortcut
may have been changed in different versions of FileMaker. Instead, just
go to
the Records menu and choose the Replace option, then continue with the
rest
of Ursus' instructions.

Except we left out that the cursor should be inside the field that is
going
to be changed.
True, you do have to first click in the Field. I did think of that and then
forgot to add it. D'oh!

Helpful Harry )

----------

D'oh?

like slap to head?

Reply With Quote
  #9  
Old   
Your Name
 
Posts: n/a

Default Re: [OT] : Populating auto serial # field I just added to past records? - 12-17-2010 , 02:38 PM



<Ursus> wrote

Quote:
"Your Name" schreef in bericht news:ieesjb$up5$1 (AT) lust (DOT) ihug.co.nz...

True, you do have to first click in the Field. I did think of that and
then
forgot to add it. D'oh!

D'oh?

like slap to head?
"D'oh!" is a quote from Homer Simpson. He says it whenever he does something
stupidor something frustrating happens. )

Helpful Harry )

Reply With Quote
  #10  
Old   
Cerulean
 
Posts: n/a

Default Re: FMP6: Populating auto serial # field I just added to past records? - 12-19-2010 , 01:05 PM



On Fri, 17 Dec 2010 09:19:38 +1300, "Your Name" <your.name (AT) isp (DOT) com>
wrote:

Quote:
"Cerulean" <Spamming (AT) NOTallowed (DOT) com> wrote in message
news:bqujg69jsekh7gqv1r3q992jo55ea91nvi (AT) 4ax (DOT) com...
On Wed, 15 Dec 2010 19:37:02 +0100, <Ursus> wrote:

"Cerulean" schreef in bericht
news:9ljhg6l2hf4rr5mk1nbmieupt78ee24ju2 (AT) 4ax (DOT) com...

I have a FMP6 db with over 2000 records. I didn't add an automatic
unique field identifier so now that I need one for the first time, is
there some way to have this new field automatically populated with
numbers? I have it set to unique contents only, etc., and then will
lock it out so users can't edit afterwards but it would be nice to
have a way to get those numbers in without my having to manually
number all 2000+ records.

Is there a way?

Thanks. D

It is the most easy if you haven't used the field for any relationships
yet.

Check.

Put the field on a layout and make sure you can enter it when browsing

Check.

find all records

Can you believe I got stuck already? I know how to SHOW all records,
but find them? Is this possible in FMP6? I've gone through all the
menu pulldowns and even tried via a script but nothing. Can you
describe the process a bit more so that if it's a command from another
version of FMP, I can see if I can figure out how to do it. Googling
yielded no results either since it seems we always have to put
something in the find field. Putting in *.* of course didn't work
since it requires a number.

"Find All" and "Show All" is the same thing. From memory FileMaker changed
the wording at some stage. It simply means to make sure you have all the
records you want to change in the current Found Set.



key CTRL-= (on windows)

I didn't know here what you meant after CTRL. Is it CTRL + -, THEN
CTRL + = ? Neither yielded any discernible results, so not sure what
this is supposed to do.

Hold down the CTRL key and press the = key ... but the keyboard shortcut may
have been changed in different versions of FileMaker. Instead, just go to
the Records menu and choose the Replace option, then continue with the rest
of Ursus' instructions.


Helpful Harry )
Thanks Helpful Harry! What worked was to just using the script step
"Replace all contents" and fiddling around with that. I place that
script permanently in my db solution but have also taken precaution of
ticking the "Prohibit modification of value" for that field which
doesn't seem to affect the numbering of new records that happens
automatically now.

Re-sequencing all the records in the db takes a millisecond, it seems,
and so saved me a ton of work. I just made sure that my records were
sorted in a preferred order before doing this. They'll get out of any
sort of sort order from now on as records are added, meaning the
serial numbers for correlate from this point forward between
alphanumerica values, but at least the first 2464 records do! <g>

Thanks. D

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.