Skip to main content
12-Amethyst
February 4, 2015
Solved

Truncate Filename in BOM Repeat Region

  • February 4, 2015
  • 1 reply
  • 1538 views

We have a need to truncate the filename to 12 characters in our BOM repeat region. Is there a trick in repeat region that this can be done? Can this be done using relation? If so, has anyone done it and willing to share?

Creo/Element M230

Thanks!

Calvin


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
Best answer by Mahesh_Sharma

Calvin,

You can use repeat region relation:

actual_length = STRING_LENGTH(asm_mbr_name)

display_length = actual_length

if (actual_length > 12)

display_length = 12

else

display_length = STRING_LENGTH(asm_mbr_name)

endif

display_name = EXTRACT(asm_mbr_name, 1, display_length)

Add report parameter rpt > rel > user defined display_name

1 reply

Mahesh_Sharma
22-Sapphire I
February 4, 2015

Calvin,

You can use repeat region relation:

actual_length = STRING_LENGTH(asm_mbr_name)

display_length = actual_length

if (actual_length > 12)

display_length = 12

else

display_length = STRING_LENGTH(asm_mbr_name)

endif

display_name = EXTRACT(asm_mbr_name, 1, display_length)

Add report parameter rpt > rel > user defined display_name