Discussions

Expand all | Collapse all

Does Quickbase have a replace function?

  • 1.  Does Quickbase have a replace function?

    Posted 06-21-2017 18:39
    In JavaScript I would do something like 

    var test = "I Hate Spaces";
    var example = test.replace(" ", "_");

    Then I could get the display "I_Hate_Spaces". Is there something similar I can do in Quickbase to replace characters in strings conditionally? I would like to be able to have it be a separate field. So then someone could then input, say a project name, then the other field would mimic the input but remove the spaces and replace them with underscores.


  • 2.  RE: Does Quickbase have a replace function?

    Posted 06-21-2017 18:52
    There is no replace function.

    But you can do this.

    var text String = [My Field];
    var text Delimiters = " !@#$%^&*";

    List("",
    Part($String,1,$Delimiters),
    Part($String,2,$Delimiters),
    Part($String,3,$Delimiters),
    Part($String,4,$Delimiters),
    Part($String,5,$Delimiters),
    Part($String,6,$Delimiters),
    Part($String,7,$Delimiters),
    Part($String,8,$Delimiters),
    Part($String,9,$Delimiters))


  • 3.  RE: Does Quickbase have a replace function?

    Posted 06-21-2017 18:56
    So this will remove the characters " !@#$%^&*" from the string?


  • 4.  RE: Does Quickbase have a replace function?

    Posted 06-21-2017 19:04
    yes, includes the space character which is the first in this list.


  • 5.  RE: Does Quickbase have a replace function?

    Posted 06-21-2017 19:14
    Mhmm this half solves the problem. I saw your post from the knowledge base early about being able to link to documents locally. I created a URL formula button based on fields in the form to be able to pull up client folders without having to navigate the server. The only time it is not working is when there are slight differences in naming conventions, such as people accidentally adding extra spaces. I was looking into replacing spaces with underscores to help reduce with inconsistency.


  • 6.  RE: Does Quickbase have a replace function?

    Posted 06-22-2017 17:11
    I am also looking for a better way to do Replace in QuickBase, as I am coming from a Microsoft Access/VBA background and have a very robust, easy-to-use function in Access to do this, including a boolean option for case sensitivity. I had just posted a support ticket the other day about this, and I was asking if it was possible to rewrite my Access function in Javascript and be able to access that custom function in my QB formulas. They told me to set up a code page to do this and reference it in my formulas. How would I go about doing this?


  • 7.  RE: Does Quickbase have a replace function?



  • 8.  RE: Does Quickbase have a replace function?

    Posted 06-22-2017 20:34
    Thanks. What do I need to know about IOL to make this work?


  • 9.  RE: Does Quickbase have a replace function?

    Posted 03-10-2019 01:35
    Quick Base now has a SearchAndReplace function as of the February 2019 release. See the "Formula function enhancements" section of https://help.quickbase.com/release-notes/february-2019-release-notes.html for more details.