Forum Discussion
11 Replies
- QuickBaseCoachDQrew CaptainThere are different levels of automation possible. The easiest to set up is to run your report and then use the More ... button and select copy these records to another table.
If that is not automated enough, then there are other methods i can describe which require more setup. - AlinMihalcea1Qrew Assistant CaptainI am looking for more automation. Final goal would be creating the records and then sending notifications to the assigned people. I was looking at using the Mr Daniel's image onload technique but I'm struggling with the code.
- QuickBaseCoachDQrew CaptainIf the Filters on the report are standard, then the low tech way is to create a saved table to table import.
Then create a URL formula button to run the import and refresh the report. The button can be located on the records that you want to copy and it does not matter which button you click (ie all records will have the same button)
The URL formula would be like
var text URL = urlroot() & "db/" & [_DBID_TABLE_B] & "?act=API_RunImport&ID=10";
"javascript:" &
"$.get('" &
$URL &
"',function(){" &
"location.reload(true);" &
"});"
& "void(0);"
That should run the import to create the records and refresh table A report. - AlinMihalcea1Qrew Assistant CaptainThis looks to be exactly what I need, but for some reason I can't get it to work... I created the Import and tested it. It works fine. I created the Formula URL button and placed it in the in the table I need to import from. Copied and pasted the formula from above and changed the table Id to the actual table name. Made sure that the report ID is 10, just like you predicted it... Not sure what else to look for...
Here is the formula:
var text URL = URLRoot() & "db/" & [_DBID_Field_S] & "?act=API_RunImport&ID=10";
"javascript:" &
"$.get('" &
$URL &
"',function(){" &
"location.reload(true);" &
"});"
& "void(0); - QuickBaseCoachDQrew CaptainI forget about the application token.
My guess is that if you do this to test the button without the refresh, that it will fail.
var text URL = URLRoot() & "db/" & [_DBID_Field_S] & "?act=API_RunImport&ID=10";
$URL
//"javascript:" &
//"$.get('" &
//$URL &
//"',function(){" &
//"location.reload(true);" &
//"});"
//& "void(0);"
So go to your setting for the application, and Advanced Properties and disable the need for application tokens, or else you will have to create an application token and change the first line to
var text URL = URLRoot() & "db/" & [_DBID_Field_S] & "?act=API_RunImport&ID=10"
& "&apptoken= xxxxxxxxxx";
Obviously paste in your app token code where the xxxxxx are. - AlinMihalcea1Qrew Assistant CaptainThat was it! Needles to say, you are awesome!!!
Thank you! Maybe I get to buy you a beer next week at empower? - QuickBaseCoachDQrew CaptainI will be there and if you are lucky there may be an open bar at the welcome evening so the beer you buy me could be cheap. They will have an EMPOWER App to download on the phone for the Conference so you can look me up on it and connect.
Mark - AlinMihalcea1Qrew Assistant CaptainAwesome! Another thing to be looking forward to :)
Thanks again! - AlinMihalcea1Qrew Assistant CaptainI have a little follow up question. Is there a way for me to display a message window that will notify the user that clicking the button will send an email to everyone on that report. If the user acknowledges, then send otherwise don't
Hope I'm not asking too much
- QuickBaseCoachDQrew CaptainI have not tested but there was a recent post here
https://community.quickbase.com/quickbase/topics/delete-a-record-without-going-into-grid-edit-or-goi...
It contained this tip
var text URL= URLRoot() & "db/" & Dbid() & "?act=API_DeleteRecord&rid=" & [Record ID#]
& "&apptoken= xxxxxxx";
"javascript: " &
"if ( confirm('Are you sure you want to permanently delete this record ? ') == true ){ "&
"$.get('" &
$URL &
"',function(){" &
"location.reload(true);" &
"});"
& "void(0);"&
"}"
So I assume if you just change the URL formula variable to the Run Import one, it will work. Please post back and let me know.