Help

Unexpected duplicate character on the end of a formula result

Topic Labels: Formulas
Solved
Jump to Solution
1292 2
cancel
Showing results for 
Search instead for 
Did you mean: 
SMP
4 - Data Explorer
4 - Data Explorer

I have 2 different kinds of {App Pseud} formats, e.g.

kay_obsessive
goblin fic (Kiestan)

Then I have a formula to spit out a URL, where the concatenate is the important bit:

IF(OR({Work Submission Pseud}!={Synced Participant},{Assigned Writer(s)}=BLANK()),BLANK(),CONCATENATE("https://autoao3app.firebaseapp.com/#/mfd2021_round2/user/",SUBSTITUTE(TRIM({App Pseud})," ","%20")))

And it spits out these URLs:

https://autoao3app.firebaseapp.com/#/mfd2021_round2/user/kay_obsessive
https://autoao3app.firebaseapp.com/#/mfd2021_round2/user/goblin%20fic%20(Kiestan)n

The extra character on URLs where the app pseud has a parenthesis always matches the character just before the ). I don’t see what is causing it in the formula. Help!

1 Solution

Accepted Solutions
Raminder_Singh
7 - App Architect
7 - App Architect

To construct URLs use ENCODE_URL_COMPONENT because it encodes not only spaces but other URL-unsafe characters as well. So maybe something like this will work:

IF(OR({Work Submission Pseud} != {Synced Participant}, {Assigned Writer(s)} = BLANK()),
  BLANK(),
  "https://autoao3app.firebaseapp.com/#/mfd2021_round2/user/" & ENCODE_URL_COMPONENT(TRIM({App Pseud})))

With my formula above the generated URLs are:

https://autoao3app.firebaseapp.com/#/mfd2021_round2/user/kay_obsessive
https://autoao3app.firebaseapp.com/#/mfd2021_round2/user/goblin%20fic%20%28Kiestan%29

Is this the expected result?

See Solution in Thread

2 Replies 2
Raminder_Singh
7 - App Architect
7 - App Architect

To construct URLs use ENCODE_URL_COMPONENT because it encodes not only spaces but other URL-unsafe characters as well. So maybe something like this will work:

IF(OR({Work Submission Pseud} != {Synced Participant}, {Assigned Writer(s)} = BLANK()),
  BLANK(),
  "https://autoao3app.firebaseapp.com/#/mfd2021_round2/user/" & ENCODE_URL_COMPONENT(TRIM({App Pseud})))

With my formula above the generated URLs are:

https://autoao3app.firebaseapp.com/#/mfd2021_round2/user/kay_obsessive
https://autoao3app.firebaseapp.com/#/mfd2021_round2/user/goblin%20fic%20%28Kiestan%29

Is this the expected result?

Yes! Thank you so much!