Forum Discussion
JeffPeterson1
4 years agoQrew Captain
How are you doing the export? If it's driven by a URL button it'll be very easy to change a field to 'Paid'.
------------------------------
Jeff Peterson
------------------------------
------------------------------
Jeff Peterson
------------------------------
MalcolmMcDonald
4 years agoQrew Cadet
Hi Jeff --
Been chasing this thread through the forums with your hints, but I'm not coming up with answer.
I can download a csv of the report via a button on the homepage pretty easily now using the opts=csv parameter.
https://[myrealm]/db/[mytable]?a=q&qid=13&opts=csv
But once I've downloaded that csv, I then want QB to set field 82 = "Paid" for every record in this report.
I have tried the formula URL nesting approach Mark Shnier documented in the URL for Dummies app -- eg:
var text URLONE = ... ;
var text URLTWO = ... ;
$URLONE
& "&rdr=" & URLEncode($URLTWO)
However, I haven't been able to figure out how to put that onto my home page's buttons and just get a garbage URL instead. My understanding is these buttons are static and don't allow that kind of dynamisms?
Thanks!
M
------------------------------
Malcolm McDonald
------------------------------
Been chasing this thread through the forums with your hints, but I'm not coming up with answer.
I can download a csv of the report via a button on the homepage pretty easily now using the opts=csv parameter.
https://[myrealm]/db/[mytable]?a=q&qid=13&opts=csv
But once I've downloaded that csv, I then want QB to set field 82 = "Paid" for every record in this report.
I have tried the formula URL nesting approach Mark Shnier documented in the URL for Dummies app -- eg:
var text URLONE = ... ;
var text URLTWO = ... ;
$URLONE
& "&rdr=" & URLEncode($URLTWO)
However, I haven't been able to figure out how to put that onto my home page's buttons and just get a garbage URL instead. My understanding is these buttons are static and don't allow that kind of dynamisms?
Thanks!
M
------------------------------
Malcolm McDonald
------------------------------
- MarkShnier__You4 years ago
Qrew Legend
The first step should be to get the button work on a form on a record. Once you have working code, you can copy and paste the exposed URL code to static dashboard button.
If you want to mass update a field, one method is to make a Saved Table to table copy with correct filters and import the table into itself merging on [Record ID#]. You would create a field called [Paid Words] with a formula of
"Paid"
and import that into that target field fid 82.
When you make a button you need to also need to decide where to land the user. One option is to have the button mark as paid and then redirect the user to that CSV Report.
So the code might be like
var text MarkAsPaid = URLRoot() & "db/" & [_DBID_my_table_name_here] & "?act=API_RunImport&ID=10;
var text ExportToCSV = https://[myrealm]/db/[mytable]?a=q&qid=13&opts=csv;
$MarkAsPaid
& "&rdr=" & URLEncode($ExportToCSV)
Once you get that working, you can remove the button label text and expose the code and paste it into a URL Button on the Dashboard.
------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------- MalcolmMcDonald4 years agoQrew CadetThanks Mark for this and for your many many contributions to the QB community. I see your name popping up all over and it's appreciated. And thanks to the other folks who jumped on as well -- Jeff & Matt..
To close the thread -- I ended up going a different way entirely to achieve what I wanted. Found an article on QB Junkies on how to use Pipelines Buckets, Pipelines QB Record functions, the QB table notifications together to create a CSV, make the edits I wanted and email out a link to the result. Did the trick perfectly, and less fiddling with URLs.
Thanks everyone!
------------------------------
Malcolm McDonald
------------------------------