How to filter a layout DXL column

Hello together,

Can anyone guide me on how to filter a layout DXL column.

"Software function" is my column name. i need to create a filter for this column, which is a layout DXL.

We tried filtering this column with the default Filter functionality, reading the attribute name.

         Filter f1 =  attribute SWFunctionName == SWFunctionValue
         set(current, f1)
         filtering(on)

   

A null pointer exception is thrown, when we execute this. How to filter such columns?

Any kind of help would be fine.

Thanks.


Adminani - Tue Mar 31 06:08:16 EDT 2015

Re: How to filter a layout DXL column
O.Wilkop - Tue Mar 31 06:24:29 EDT 2015

Try using

Filter f1 = column(SWFunctionName, SWFunctionValue)

(with SWFunctionName and SWFunctionValue being string variables).

Re: How to filter a layout DXL column
Adminani - Fri Jun 12 01:09:53 EDT 2015

O.Wilkop - Tue Mar 31 06:24:29 EDT 2015

Try using

Filter f1 = column(SWFunctionName, SWFunctionValue)

(with SWFunctionName and SWFunctionValue being string variables).

Hello

The solution posted works very well.

We face some issues while looking for exact match.

if the value to be filtered is "Rain" , we need to have columns only with value "Rain" and not "Raining".

We tried this out by switching off the regex based filtering of the same api column().

But this doesn't work.

Below is the code sample we follwed ;

 

Filter f1 = column(SWComponentAttrName,SWComponentAttrValue , true, false)

 

Can anyone post any help on this.

 

Thanks in advance.

 

Re: How to filter a layout DXL column
O.Wilkop - Fri Jun 12 05:25:15 EDT 2015

For a whole word search we have to use a regex:

Filter f1 = column(SWFunctionName, "\\b"SWFunctionValue"\\b", true, true)

Try this; adding "\\b" before and after the search string tells the regex to look for words that have a so called "word boundry"(beginning of the text, end of the text, space, newline, etc.) at the beginning and end of the string. This allows you to search the whole word instead of parts of it. You can check http://www.regular-expressions.info/wordboundaries.html if you want to learn more about that.

Re: How to filter a layout DXL column
Adminani - Fri Jun 12 05:33:13 EDT 2015

O.Wilkop - Fri Jun 12 05:25:15 EDT 2015

For a whole word search we have to use a regex:

Filter f1 = column(SWFunctionName, "\\b"SWFunctionValue"\\b", true, true)

Try this; adding "\\b" before and after the search string tells the regex to look for words that have a so called "word boundry"(beginning of the text, end of the text, space, newline, etc.) at the beginning and end of the string. This allows you to search the whole word instead of parts of it. You can check http://www.regular-expressions.info/wordboundaries.html if you want to learn more about that.

Thanks a lot :) This works..!!!! Smile