BOM table relations to compare model name
Hi All,
I have a BOM table with custom BOM Balloon parameter called BOMREF. In BOM relations, I am comparing asm_mbr_name to the typed in string value and then adjusting value of BOMREF parameter using if statement. See screen shot below for one of the assembly.

I want to automate this process so that I don't have to type the string value every time I change the assembly. It should automatically pick it up from file name.
For manufactured parts, the file name is always of the format XXXGYYY.prt/asm where XXX and YYY are unique numerical numbers or integers. Example file name would be 421G196.asm.
My idea is to write relation which looks at the format of file name and if the file name is as per the format above then it should assign BOMREF a value of "M" + "AAA". where "AAA" is a sequential number starting from 001 and going up to rpt.index in the BOM table.
Any idea on how to do it is highly appreciated.
Thank you in advance.
Regards
Danish

