Skip to main content
14-Alexandrite
February 10, 2015
Solved

REPEAT REGION FILTERS

  • February 10, 2015
  • 6 replies
  • 4903 views

Hi everyone,

is it possible to have a filter in a repeat region like this:

if &asm.mbr.name =*X1* then &asm.mbr.name else &asm.mbr.name&asm.mbr&ptc_wm_revision

so, if name is "390972X1" it shows only "390972X1" otherwise if name is "6512453M" it shows "6512453M1" where 1 is revision

thanks!


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 TomU

Sure. Here are the steps.

1.) Go to "Table", "Repeat Region", "Relations", then select the region in the table.

2.) Expand the "Local Parameters" section of the window.

3.) Create a new parameter to hold the changing value. Let's call it "NAME" (String)

4.) Make sure "ASM_MBR_NAME" "ASM_MBR_PTC_WM_REVISION" are already listed as parameters. If not, add either manually add them (type doesn't matter) or go back out and temporarily add columns with the parameters (this will add them to the parameters list in the relations.)

5.) Add the following relations to the relations section at the top.

IF SEARCH(asm_mbr_name,"X1") > 0

NAME = asm_mbr_name

ELSE

NAME = asm_mbr_name+asm_mbr_ptc_wm_revision

ENDIF

6.) Exit the relations editor.

7.) Change the repeat region parameter in the table cell that currently reads &asm_mbr_name to instead read &rpt.rel.NAME. This may be simpler by right clicking on the cell and choosing "Report Parameter", "rpt..", "rel.", "User Defined", and then type "NAME".

6 replies

23-Emerald IV
February 10, 2015

Filters can use "and" (&) and "or" (|), but not "if' or "then". Instead use repeat region relations to dynamically switch, append, or alter values as necessary.

cspinelli14-AlexandriteAuthor
14-Alexandrite
February 10, 2015

thanks, can you show me a way to do that?

TomU23-Emerald IVAnswer
23-Emerald IV
February 10, 2015

Sure. Here are the steps.

1.) Go to "Table", "Repeat Region", "Relations", then select the region in the table.

2.) Expand the "Local Parameters" section of the window.

3.) Create a new parameter to hold the changing value. Let's call it "NAME" (String)

4.) Make sure "ASM_MBR_NAME" "ASM_MBR_PTC_WM_REVISION" are already listed as parameters. If not, add either manually add them (type doesn't matter) or go back out and temporarily add columns with the parameters (this will add them to the parameters list in the relations.)

5.) Add the following relations to the relations section at the top.

IF SEARCH(asm_mbr_name,"X1") > 0

NAME = asm_mbr_name

ELSE

NAME = asm_mbr_name+asm_mbr_ptc_wm_revision

ENDIF

6.) Exit the relations editor.

7.) Change the repeat region parameter in the table cell that currently reads &asm_mbr_name to instead read &rpt.rel.NAME. This may be simpler by right clicking on the cell and choosing "Report Parameter", "rpt..", "rel.", "User Defined", and then type "NAME".