Best answer

Removing plural words for non plural

  • 24 August 2021
  • 8 replies
  • 49 views

So I currently have a bunch of data coming from a woo commerce store, one of which is categories from the site which are all plural. I need to swap them out for the singular versions. what's the best way to do it?

icon

Best answer by Troy Tessalone 24 August 2021, 18:27

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

8 replies

Userlevel 7
Badge +14

Hi @CollapsedOrange 

Can you post actual examples for us to evaluate and advise?

I have 5 categories on the website Monuments, Arenas, Maps, Lobbies and Prefabs I just need to swap them to arena, map, lobby and prefab. They are all inside the categories name input

 

Userlevel 7
Badge +14

Hi @CollapsedOrange 

Some options to try…

Formatter > Utilities > Lookup Table: https://zapier.com/help/doc/how-use-formatter-functions#using-the-lookup-table

Code step using the replace() function:

https://zapier.com/apps/code/help

https://www.w3schools.com/jsref/jsref_replace.asp

@Troy Tessalone I basically just need the opposite of the formatter pluralize function
 

 

Userlevel 7
Badge +14

@CollapsedOrange 

Code step will be able to do the text transformations in 1 Zap step.

Userlevel 7
Badge +14

@CollapsedOrange 

If the only ‘s’ in your Category options is the last letter that makes each work plural, then you can try using this: Formatter > Text > Replace

 

@Troy Tessalone Thank you. Ill look in to the options 

The lookup table seems to be the best option, it lets me remove the capitals too, all in one step. Code probably would be the best option but I cant code.