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

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Truncate parameter in a format repeat region

akok
12-Amethyst

Truncate parameter in a format repeat region

I will like to in a table on a format having the PTC_WM_CREATED_BY shown, but only the initial.

 

Can I on my format in the Repeat region use a relation to truncate this parameter, I have tied the relations in the Repeat region menu, but can't get it to work.


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
MartinHanak
24-Ruby III
(To:akok)

Allan,

here is my "procedure":

  1. I opened the drawing containing repeat region table with relation
  2. I saved the table as rr_table.tbl
  3. I created new format and imported table from rr_table.tbl
  4. I saved format
  5. I created new drawing ... in dialog box I selected drawing model and drawing format
  6. new drawing now contains requested table

MH


Martin Hanák

View solution in original post

6 REPLIES 6
MartinHanak
24-Ruby III
(To:akok)

Allan,

is the following example describing correctly your need ?

PTC_WM_CREATED_BY="Martin Hanak"

PTC_WM_CREATED_BY_TRUNC="MH"

MH


Martin Hanák
akok
12-Amethyst
(To:MartinHanak)

Martin,

not really.

I have in the filter "&mdl.param.name  == PTC_WM_CREATED_BY", and that give me the full name.

In the relations I have tried "truncated = extract(mdl_param_value, string_length(mdl_param_value)-10, 3)", this give not error, but not change anything. If I use PTC_WM_CREATED_BY, comes an error "PTC_WM_CREATED_BY is unknown".

What shall I put the filter and in the relation?

Allan

MartinHanak
24-Ruby III
(To:akok)

Allan,

below written procedure is related to my data created in CR2 M070.

  1. I "informed" repeat region about existence of MY_PTC_WM_CREATED_BY parameter, this means I selected table cell and clicked asm > mbr > User Defined and entered MY_PTC_WM_CREATED_BY
  2. I updated table ... see result in upper table on my drawing
  3. I created the same table once again ... see lower table on my drawing
  4. I added relation ... TRUNC_MY_PTC_WM_CREATED_BY = extract(asm_mbr_MY_PTC_WM_CREATED_BY, string_length(asm_mbr_MY_PTC_WM_CREATED_BY)-10, 3)
  5. I replaced the contents of table cell in second column, I removed &asm.mbr.MY_PTC_WM_CREATED_BY and entered &rpt.rel.TRUNC_MY_PTC_WM_CREATED_BY (it is also possible to click rpt > rel > User Defined)

MH


Martin Hanák
akok
12-Amethyst
(To:MartinHanak)

Martin,

I can get your description to work on a drawing, but on a drawing format then I will create the relation my parameter is not known. And therefore I get an error. How can I fix this?

Allan

MartinHanak
24-Ruby III
(To:akok)

Allan,

here is my "procedure":

  1. I opened the drawing containing repeat region table with relation
  2. I saved the table as rr_table.tbl
  3. I created new format and imported table from rr_table.tbl
  4. I saved format
  5. I created new drawing ... in dialog box I selected drawing model and drawing format
  6. new drawing now contains requested table

MH


Martin Hanák
akok
12-Amethyst
(To:MartinHanak)

Martin,

Thank you it's working.

Allan

Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags