Best answer

Zapier Text Formatter - Spreadsheet Style Formulas

  • 16 September 2022
  • 3 replies
  • 123 views

How could I combine these three if statements? I’ve tried variations of OR and AND and more or less don’t know what I am doing. Thank You!

 

=IF("{{167671070__Marketplace Access}}"="Full Access","marketplace_full"),

=IF("{{167671070__Marketplace Access}}"="Pending Request","marketplace_pending"),

=IF("{{167671070__Marketplace Access}}"="Partial Access","marketplace_partial"),

 

icon

Best answer by Troy Tessalone 16 September 2022, 01:15

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.

3 replies

Userlevel 7
Badge +14

Hi @Raeler 

Good question.

A Code step would be better suited for this logic.

 

INPUT

 

CODE

JavaScript

let MarketplaceAccess = inputData.MarketplaceAccess;

if (MarketplaceAccess == "Full Access") {
MarketplaceAccess = "marketplace_full";
}

if (MarketplaceAccess == "Pending Request") {
MarketplaceAccess = "marketplace_pending";
}

if (MarketplaceAccess == "Partial Access") {
MarketplaceAccess = "marketplace_partial";
}

output = [{MarketplaceAccess}];

 

OUTPUT

 

Userlevel 7
Badge +14

@Raeler 

Actually you can use a Formatter > Utilities > Lookup Table Zap action step for this: https://zapier.com/help/create/format/create-lookup-tables-in-zaps

These are great! Thank you very much @Troy Tessalone