Skip to main content

IF statement for field condition with URL Encoding options

  • April 23, 2020
  • 3 replies
  • 41 views

Hi Community,

Appreciate if someone can help comment about this statement as its not working. Thanks.

IF(
{Event Type} = ‘Partner Tech Talk’,
CONCATENATE(“URL/YYYYYYYYYY”,"?prefill_id=",ENCODE_URL_COMPONENT({Feedback Key}),
CONCATENATE(“URL/XXXXXXXXXX”,"?prefill_id=",ENCODE_URL_COMPONENT({Feedback Key})
)

NOTE: I concealed actual URLs - assuming URL/YYYYYY works. In other words CONCATENATE statement works by itself. However, when trying to create IF statement picking the right URL based on Event Type field this doesn’t work.

This topic has been closed for replies.

3 replies

Forum|alt.badge.img+3
  • Inspiring
  • April 24, 2020

I tried replicating this but it gave me a link everytime!

Formula (it’s just using dumb test date but it outputted a link everytime):

IF(test3="late",CONCATENATE("airtable.com/","?prefill_id=",ENCODE_URL_COMPONENT({Field 12})),CONCATENATE("airtable.com/?","prefill_id=",ENCODE_URL_COMPONENT({Field 11})))

See

Could you share with dummy data?


  • Author
  • New Participant
  • April 24, 2020

Thanks Aron,

So my syntax is correct then? Event Type field is a multiple choice. Did I use correct quotes ’ ’ vs. " "?

The only difference in your code segment is string logic vs. field object I think.


  • Author
  • New Participant
  • April 24, 2020

Aron thanks for the rapid response! I figured out… I was missing couple of closed brackets :slightly_smiling_face: It works now