Forum Discussion
_anomDiebolt_
8 years agoQrew Elite
This is a messy problem only because the grid edit code QuickBase uses is messy. I would discourage you from doing this because it is messy but on the other hand it sounds like you have an unmet requirement so you may need to pursue a script solution nevertheless.
You basically have two options to intercept QuickBase's saving of the modified Grid Edit interface and create you custom logging feature (BTW I don' really understand the format you are describing).
Serrvice Worker
Create a Service Worker that will intercept network requests for ?a=QBI_GridEditSubmit and in addition to responding with the normal response, decode the XML response payload and perform a AJAX call to log changed values. The XML response has a tag <gridData2000> which encodes the [Record ID#]s and fields in a proprietary format that uses a five character delimiter (~~!~^). Here are a couple of sample XML responses:
Modify QuickBase Code
QuickBase's Grid Edit Code is currently located hereL:
https://assets.quickbasecdn.net/res/8abb665-19/js/gridEdit.js
You can beautify the code and start reading it (it is a lot of fun so server drinks, make popcorn and turn it into a family event). The function GE_BuildRetval() has all the logic that builds the return value representing all the new and updated fields from the grid edit session. You can redefine this function using IOL and make it do what you want in addition to what QuickBase expects it to do. So grab the fields you need to create a log entry and make an independent AJAX call to log the changes in the format you desire.
It is totally doable but like I said there are a lot of messy details.
You basically have two options to intercept QuickBase's saving of the modified Grid Edit interface and create you custom logging feature (BTW I don' really understand the format you are describing).
Serrvice Worker
Create a Service Worker that will intercept network requests for ?a=QBI_GridEditSubmit and in addition to responding with the normal response, decode the XML response payload and perform a AJAX call to log changed values. The XML response has a tag <gridData2000> which encodes the [Record ID#]s and fields in a proprietary format that uses a five character delimiter (~~!~^). Here are a couple of sample XML responses:
<qdbapi>
<geRidListStr2000>1~~!~^-10~~!~^-11~~!~^-12~~!~^-13~~!~^-14~~!~^-15</geRidListStr2000>
<geDFID2000>0</geDFID2000>
<geDBID2000>bm8kqf65a</geDBID2000>
<geOldRidListID2000>7208</geOldRidListID2000>
<geDoneURLID2000>7</geDoneURLID2000>
<gridData2000>
n~~!~^-10~~!~^
t~~!~^-10~~!~^6~~!~^~~!~^4
t~~!~^-10~~!~^7~~!~^~~!~^5
t~~!~^-10~~!~^8~~!~^~~!~^6
n~~!~^-11~~!~^
t~~!~^-11~~!~^6~~!~^~~!~^7
t~~!~^-11~~!~^7~~!~^~~!~^8
t~~!~^-11~~!~^8~~!~^~~!~^9
</gridData2000>
</qdbapi>
<qdbapi>
<geRidListStr2000>1~~!~^2~~!~^3~~!~^-10~~!~^-11~~!~^-12~~!~^-13</geRidListStr2000>
<geDFID2000>0</geDFID2000>
<geDBID2000>bm8kqf65a</geDBID2000>
<geOldRidListID2000>7209</geOldRidListID2000>
<geDoneURLID2000>7</geDoneURLID2000>
<gridData2000>
t~~!~^1~~!~^6~~!~^1~~!~^2
t~~!~^1~~!~^7~~!~^2~~!~^4
t~~!~^1~~!~^8~~!~^3~~!~^6
</gridData2000>
</qdbapi>
Modify QuickBase Code
QuickBase's Grid Edit Code is currently located hereL:
https://assets.quickbasecdn.net/res/8abb665-19/js/gridEdit.js
You can beautify the code and start reading it (it is a lot of fun so server drinks, make popcorn and turn it into a family event). The function GE_BuildRetval() has all the logic that builds the return value representing all the new and updated fields from the grid edit session. You can redefine this function using IOL and make it do what you want in addition to what QuickBase expects it to do. So grab the fields you need to create a log entry and make an independent AJAX call to log the changes in the format you desire.
It is totally doable but like I said there are a lot of messy details.