How to replace %20 by "-" in a url created from a dynamic collection

Is it only in preview mode ?

I would like to replace these %20 between the spaces. But as the url is created dynamically I don’t know how and where to change this.
And I want the user to be able to reach the url just by writing it

Hi @antony :wave:

You can create a “slugify” formula so that spaces (represented by %20) are replaced by -

In the example above, you can see that:

  • we are using the lowercase nocode formula to ensure all the text is lowercased
  • we are using a short JavaScript function at the end of the text .replaceAll()
  • in that function, we are saying replace spaces " " by dashes "-"
  • in the Current value the text is formatted as a slug

Does that help?

1 Like

Note, if you want to reuse this formula in different places of your project, you could create a global formula with a text parameter:

Then you could use that custom formula anywhere in your project:

3 Likes

Hi Joyce !
Thank you ! :slight_smile: :star_struck:

1 Like