AnsweredAssumed Answered

Field Calculation error

Question asked by tmilas on Feb 5, 2013
Latest reply on Mar 8, 2013 by tmilas

My Fellow FMers,

 

I've been mid level guy. However this time I stumbled on something and it seems can't go forward.

Here is my dilemma:


I created DB with records of products/items.

My company has the strict rules for serial numbers:

 

1VAL12B123ADVAC

 

1VAL is always there, 12 means a year of manufacture, B means a second month, 123 is an actual serial number. ADVAC is a type of product.

12 - year can be obtained from "date created" field (auto-enter today's date), so is the month B from the date created (calculation).

Serial number starts for new month at 100, still OK and sequential number is done by adding 1.

 

There are several fields I created for getting this done. Now for similar solution I duplicated the formula and am getting unclear error message while the same calculation works fine in different DB.

 

Here is the calculation for Data Base "A" attachment (130204.fp7) that works OK:

 

 

If(Cat#="";"";Let ( [

 

part1 = "1VAL" ;

part2 = Period ;

 

part3 = If ( theStart > 0 ; 100 + SN - theStart ; 100 ) ;

/*part3 = TextColor ( part3 ; RGB ( 200 ; 0 ; 50 )) ;*/

part4 = (Type1)] ;

 

 

Identical application in Data Base "B" attachment (Padmount...) gives me the following error:

 

If(Style#="";"";Let ( [

 

part1 = "1VAL" ;

part2 = Period ;

 

part3 = If ( theStart > 0 ; 100 + SN - theStart ; 100 ) ;

/*part3 = TextColor ( part3 ; RGB ( 200 ; 0 ; 50 )) ;*/

part4 = (Type)] ;

 

"A number, text constant, field name or "(" is expected here."

 

Pls HELP!!!, anyone?

 


Outcomes