If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > FileMaker > Selective Increment

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-13-06, 17:28
dhsa21 dhsa21 is offline
Registered User
 
Join Date: May 2006
Location: Atlanta
Posts: 2
Selective Increment

Hi Everyone,



I have a database whereas:
Associate 1 – All his case numbers begin with 14-xxx
Associate 2 – All his case numbers begin with 12-xxx
And so on

"Case Number" is the field that all the case numbers are stored in. "Associate" is the field the associates are in.

What I need is the “case number” field to increment by 1 whenever associate 1 is assigned the case. For example, if the
Case is assigned to Associate 1 and his last case number was 14-300 I need the next case number to be 14-301 ;
And if the last case for Associate 2 is 12-3001 and I want to enter a new case and assign it to associate 2 the next case will be 12-3002

The “case number” field should be one field that has both 14 & 12 prefixes.

Please help if possible. And THANKS SO MUCH if you do !!

David Smith
dsmith@davidsmithfire.com
dhsa@bellsouth.net
Reply With Quote
  #2 (permalink)  
Old 05-14-06, 14:46
chriscozi chriscozi is offline
Registered User
 
Join Date: Apr 2004
Posts: 61
There are several methods of implementation.
First create serial number global field for each Associate. Then change your Case Number to be a text calculation of the id (12 or 14), the ampersand, a hyphen in quotes, an ampersand, and the serial number. Make this calculation NOT replacing the current value.

As the serial number increments with each new record you'll get a new number following the id and a hyphen.

There are major multi-user problem with relying on serial number fields, but they require complex solutions. If this works, don't sweat it. When your solution is used by multiple people, be prepared to change that serial number field for a REAL unique number generated possibly from a time stamp and a global of the current largest entry and or who knows what. That will PROBABLY work most of the time.

Here's the calculation for the Case Number field:

Table::AssociateIDfield & "-" & Table:: SerialNumberField

Happy fmp-ing!

Last edited by chriscozi; 05-14-06 at 14:50.
Reply With Quote
  #3 (permalink)  
Old 05-14-06, 19:20
dhsa21 dhsa21 is offline
Registered User
 
Join Date: May 2006
Location: Atlanta
Posts: 2
Smile Thanks for Reply !!!

Thanks SO MUCH !!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On