Solved

How to update multiple attributes based on keywords?

  • 12 September 2016
  • 4 replies
  • 1 view

Hi all,

 

 

I would like to update attributes bases on certain keywords.

 

My reader consists of XML files, writing to an Access DB.

I'd like to do the following:

If in the column Official_name a certain keyword is detected I'd like to have the columns Category_main and Category_sub updated by various values.

E.g.

 

Official name is "B&B; FME City" - keyword B&B; is found and Category_main should be updated to Hotel/Motel, Category_sub is updated to "Bed & Breakfast & Guest Houses" Official_name Category_main Category_sub B&B; FME City Hotel/Motel Bed & Breakfast & Guest Houses

Many thanks,

 

 

Ed

icon

Best answer by mark2atsafe 12 September 2016, 17:13

View original

4 replies

Userlevel 4

Lots of different ways to do this, but one easy solution would be the TestFilter with an AttributeCreator for each category, e.g.

Add items to the TestFilter as needed, directing them to different AttributeCreators.

Badge

Hi @edttom

This can be achieved with a TestFilter that looks for specific keywords (you can use regex if you liked) and an AttributeManager that will update the values of the attributes Category_main and Category_sub.

Good luck!

Userlevel 4
Badge +25

You could also use the AttributeManager by itself. For the attribute value click the dropdown list and choose Conditional Values. That opens a dialog where you can set test conditions, much as if the TestFilter were embedded directly inside the AttributeManager.

Thanks all! I ended up using the AttributeManager with the Conditional Values because I have multiple attributes I needed to update.

Reply