Forum Discussion

EdwardAbrahim's avatar
EdwardAbrahim
Qrew Member
5 years ago

Text Passed to URL Truncated at Space

URLRoot() & "db/" & [_DBID_ASSETS] & "?a=q&qid=31&nv=2&v0=" &[Name];

For example, if Name above is "Lastname, Firstname" then the url above would be:
https://xxx.quickbase.com/db/bp6itgamh?a=q&qid=31&nv=2&v0=Lastname,

How to get the entire string to come through?

In addition, if a string is used without a space, for example "Lastname,Firstname" then the url is:

https://xxx.quickbase.com/db/bp6itgamh?a=q&qid=31&nv=2&v0=Lastname,Firstname'
Note the trailing apostrophe. Makes for data corruption.
Thanks in advance.
Edward


Quick Base Error
Quickbase remove preview
Quick Base Error
Quick Base is a web-site that lets you select, customize, and share online workgroup applications. The application you are using right now is powered by Quick Base. Chances are that your organization has purchased the Quick Base service, in which case you might be able to build and deploy your own web application for little or no additional cost.
View this on Quickbase >


Quick Base Error
Quickbase remove preview
Quick Base Error
Quick Base is a web-site that lets you select, customize, and share online workgroup applications. The application you are using right now is powered by Quick Base. Chances are that your organization has purchased the Quick Base service, in which case you might be able to build and deploy your own web application for little or no additional cost.
View this on Quickbase >



------------------------------
Edward Abrahim
------------------------------

6 Replies

  • AustinK's avatar
    AustinK
    Qrew Commander
    It is best practice to run the fields through the URLEncode function if they will be included in a URL.

    URLRoot() & "db/" & [_DBID_ASSETS] & "?a=q&qid=31&nv=2&v0=" &URLEncode([Name]);

    That should come out correctly for you now no matter how the name is set up.
    • EdwardAbrahim's avatar
      EdwardAbrahim
      Qrew Member
      Thanks for the response. URLEncode does solve the issue of the spaces so the text is no longer being truncated there. However, there is still the second issue of an appended apostrophe.
      Input:
      URLRoot() & "db/" & [_DBID_ASSETS] & "?a=q&qid=31&nv=2&v0=" &URLEncode([Name]);

      Output:
      https://xxx.quickbase.com/db/bp6itgamh?a=q&qid=31&nv=2&v0=Lastname,Firstname'

      Should be:
      https://xxx.quickbase.com/db/bp6itgamh?a=q&qid=31&nv=2&v0=Lastname,Firstname
      Thanks in advance again,
      Edward

      ------------------------------
      Edward Abrahim
      ------------------------------
      • AustinK's avatar
        AustinK
        Qrew Commander
        The output I see with the formula I gave is this:

        https://xxxx.quickbase.com/db/xxxxxxxx?a=q&qid=31&nv=2&v0=Syrup%2C%20Maple

        The %2C is the comma and %20 is the space. There should not be a trailing apostrophe. I made the above formula using UserToName(user()) to grab the current user but you could use any number of things for that.

        I notice that you have a semi colon at the end of your input line so I assume this is being used in a larger formula as a variable. I think in order to help further I would need to see that larger formula as I am going to guess there is some errant apostrophe in there. That is the only place I can think you may be getting that from. Unless the data was bad in the first place and the name actually contained it already.