Forum Discussion
Sorry I didn't respond sooner, I thought I had posted that this worked perfect.
I have another URL button question!
I have a button that will check or uncheck a check box. It works perfect! Here is my issue.
The button is displayed on a parent table via a link report. When I push the button from the parent table link report, it redirects me to the child record. My goal is to push the button from the link report and stay on the parent record in either edit or display mode.
The check box triggered by the button triggers a pipeline for the parent record, which is why I want to stay there.
Appreciate any help as I have tried everything!
------------------------------
Joseph Mahon
------------------------------
There is an example of some code which will set the value in a field and then refresh the page. The beauty of this is even though you might be pressing the button on a link from an embedded child record it will refresh the whole Quickbase page that you were already on and not just display the child record.
var text Approve = URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&rid=" & ToText([Record ID#])
& "&_fid_144=Approved";
var text RefreshPage = URLRoot() & "db/" & Dbid() & "?a=doredirect&z=" & Rurl();
$Approve
& "&rdr=" & URLEncode($RefreshPage)
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------
- JosephMahon3 years agoQrew Cadet
This works perfect! Thank you!
One other thing I thought of.... Is there a way to get it to load the parent table but in view only mode.
This whole set up works, but the pipeline doesn't run fast enough and after pushing the button, we need to refresh the page for the pipeline to have taken effect.
------------------------------
Joseph Mahon
------------------------------- MarkShnier__You3 years ago
Qrew Legend
Well, you can have the last line read
var text DisplayParent= URLRoot() & "db/" & [_DBID_PARENT_TABLE_NAME]
& "?a=dr& rid=" & [Related Parent];
$Approve
& "&rdr=" & URLEncode($DisplayParent)As for the issue of the embedded child table not updating quick enough due to the pipeline speed, one trick is to have that embedded table be in a Tab which is not the main tab. That will force the user to click a Tab to display the child table and by the time they click the button there's a good chance the pipeline will have run.
What does the pipeline do when you click the URL Formula button? Perhaps the URL formula button itself can do the updates you need.
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------- JosephMahon3 years agoQrew Cadet
I appreciate all of the help! It is almost working perfect. The pipeline runs and the ultimate goal is achieved but I am getting an error with this code:
var text Approve = If([Import Note Check Box] = false, URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&rid=" & ToText([Record ID#])
& "&_fid_39=1",URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&rid=" & ToText([Record ID#])
& "&_fid_39=0");var text DisplayParent= URLRoot() & "db/" & [_DBID_EPISODES_OF_CARE] & "?a=dr& rid=" & [Related Episode];
$Approve
& "&rdr=" & URLEncode($DisplayParent)I think it has to do with [Related Episode]
Here is the function:
Our staff dictates notes into the child table while on the road. When they come home and go into the Parent Table and click the URL button we are creating here. This checks a box on the child record and then triggers a pipeline. The pipeline maps the fields from the child table to the parent table. There are about 12-15 fields.
------------------------------
Joseph Mahon
------------------------------