![]() ![]() Set next Serial value (serial, serialmax +1) ![]() If you want the system to create automatically records with the missing serials before creating 'normal records', create a second script: fp5 solution but it will still work in fp7. Goto layout (with global field showing missing serials) Set Field (missingserials_gt, If(IsEmpty(missingserials_gt), serial_gn), missingserials_gt & "" & serial_gn Serialmissing_cnu – calc – number – unstored = if(IsEmpty(missingserial_gt),0,PatternCount(missin gserials_gt, "")+1)Īnd a self join relationship : findserial – serial_g::serial Serialmax – summary – number = max of serial You need a few basic fields, and 1 relationship, together with your find request : ![]() I can expand on any of this if you need it. That's kind of a brute force algorithm, looking at each record (and each missing record.) Not pretty, but it should get you there.Īnother way that might work is to use list filtering (requiring FileMaker Advanced and custom functions,) taking a calculated list of all serials in the range (using a CF probably,) and the list of all existing serials in the range (either with list() on a relationship or a Copy All Records,) and showing the values not in the list of existing with use of a CF like NotList(). If the inner loop control matches current record's serial, exit Set inner loop control index at value of outer loop control Set outer loop control to current record serial Use a nested looping script to skip through the existing records and append missing numbers to a variable or global field. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |