Skip to main content
12-Amethyst
November 25, 2015
Solved

Truncate parameter in a format repeat region

  • November 25, 2015
  • 1 reply
  • 2874 views

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.
Best answer by MartinHanak

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

1 reply

24-Ruby III
November 26, 2015

Allan,

is the following example describing correctly your need ?

PTC_WM_CREATED_BY="Martin Hanak"

PTC_WM_CREATED_BY_TRUNC="MH"

MH

akok12-AmethystAuthor
12-Amethyst
November 26, 2015

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

24-Ruby III
November 26, 2015

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