Forum Discussion

QuinnFrancis's avatar
QuinnFrancis
Qrew Member
6 years ago

Surface Field Value in Quick Base HTML page

I am trying to surface Quick Base field value within Quick Base's native Page options. I have tried the following
https://<DOMAIN>.quickbase.com/db/<DBID>?a=API_GetRecordInfo&rid=<RID>&apptoken=<APPTOKEN>;
<Domain>=quickbase site (example.quickbase.com)
<DBID>=Table ID found in URL (bp4e5xxxx)
<RID>= field ID which is just (7)
<APPTOKEN>=Token for the app being used (b472nq_kh9p_b5xxdus26ek9dnty7g6xxxx)

When doing this within a code page I get two results. 
1. If I enter this into a quick base web page via url I get the following:
   

2. When I enter it as a button pointing to a Quick Base Page of Code type, I get the following
https://example.quickbase.com/db/bp4e5xxxx?a=API_GetRecordInfo&rid=7&apptoken=b472nq_kh9p_b5xxdus26ek9dnty7g6xxxx https://

My Java script and general programming knowledge is very limited so any help is in very simplified terms with examples is appreciated.

Eventually I plan to plug this value into my tableau dashboard html I have running in Quick Base, but for now would like to start here and surface the field value I need.

Thanks!




------------------------------
Quinn Francis
------------------------------
  • AustinK's avatar
    AustinK
    Qrew Commander
    So you want to pull a value via the api back to your code page and then do something with it? "surface Quick Base field value within Quick Base's native Page options" is a little confusing to me. If you could try explaining what your end goal here is maybe that would help.

    What you will get returned via the call you are making is the entire record and all fields within it plus the data in xml format. Then you would need to use JavaScript or something else to break that xml down into what you want. I'm not sure there is a simple way to explain that but check stack overflow and search what you need to do. If you need to convert xml to json or something else, etc. Or even pull values from the xml without conversion. That site can give examples but it will take some searching and time.
    • QuinnFrancis's avatar
      QuinnFrancis
      Qrew Member
      Austin,
      Your rephrasing (pull a value via the api back to your code page and then do something with it)  is correct. 

      Thanks

      ------------------------------
      Quinn Francis
      ------------------------------
      • AustinK's avatar
        AustinK
        Qrew Commander
        https://help.quickbase.com/api-guide/getrecordinfo.html

        If you look there at the bottom to shows you how it is returned to you from an API call. You could display that somehow in the html. But in order to pull the actual data from there you will need to use JavaScript.

        I'm trying to think of an easy way to explain using the API and I don't think there is. If you are pulling data and connecting to Quick Base with JavaScript you are going to run into issues without understanding it, and I'm not sure those can be explained easily. I would not suggest integrating JavaScript API calls into your Quick Base unless you also plan on learning it. You could end up in a bad place later on if something stops working and need to pay someone to figure everything out or just have business down time.

        The one thing I would suggest exploring is looking into how to send a value from the record to a code page via a button on the record, which I believe you mentioned earlier. This is easy, and then pulling the value into JavaScript is easier for you because you don't need to mess with the harder stuff like promises.

        Read the last post by Chayce here.

        Then read this as well for how to use window.location to pull that value out.