cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

Truncate Filename in BOM Repeat Region

cying
12-Amethyst

Truncate Filename in BOM Repeat Region

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.
ACCEPTED SOLUTION

Accepted Solutions
Mahesh_Sharma
22-Sapphire I
(To:cying)

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

View solution in original post

1 REPLY 1
Mahesh_Sharma
22-Sapphire I
(To:cying)

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

Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags