The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
"Attribute Filter"
I am using the ExcelExample Source to bring in a new spreadsheet. The I am using the Atttribute Filter. Is there a way to have the parameter string equal 2 strings? I have it set for the attribute "comments" right now and want to include the group and costs.
Tagged:
0
Answers
you mean, you want to filter two attributes simultaneously? This can be done using regular expressions. E.g. if you want to remove two attributes called att1 and att2, you have to set the corresponding parameter to "att1|att2" meaning you want to remove all attributes whose names match either att1 or att2.
Kinds regards,
Tobias
Do you have an example?
Here is what I have
Number Comment Amount
1 Trailer lights don't work because the connection is loose $75.08
2 Rear lights blink intermittantly $125.73
3 Trailer light stopped working water in the connection $23.34
4 brake light are inop $34.56
5 Dome light doesn't work $87.23
When I pull the data in from an Excel spreadsheet the data will have 3 attributes.....Number Comment and Amount. I used the attribute filter to just get the comments so I could create word vectors from the comments. Now I would like to also pull the amount with the comment. Maybe I need a model shift here?
just use the [tt]AttributeFilter[/tt] and specify "Comment|Amount" as parameter [tt]parameter_string[/tt], or simply take the following code ... Hope that solves your problem.
Regards,
Tobias
<operator name="FilterNumberedFields" class="AttributeFilter">
<parameter key="condition_class" value="attribute_name_filter"/>
<parameter key="parameter_string" value=".*-FIELD-(\d)"/>
<parameter key="invert_filter" value="true"/>
</operator>