Skip to main content
Question

creating a button that references a record in a report link to create a new record in another app

  • November 28, 2018
  • 0 replies
  • 194 views

I would like to add a button to a form that can create a new record in another app based on a report link on the form. 

The report link has a list of items and information about what condition they are in. If the items are not in satisfactory condition, the user makes a grid edit to the report and selects that, then saves and continues. What I would like to do is have a button appear when that happens that will create a new record in the app where the item information is kept so that they can fill out a discrepancy report for the item.

  • Registered
  • March 21, 2019
i may need more information about this but my simple answer is to create a formula URL field in the table where you report link is coming from. Check the box that says show as a button and paste in the URL to "Add Discrepancy Report". You should be able to tell it when to show the button when you write the formula...

Example: In the code below I have a button that toggles on and off when a summary field from my relation is equal to 0 and our turnover date is blank (null).

If([# of records in Planning]=0 and IsNull([Actual Turned Over Date]),URLRoot() & "db/" & [_DBID_PLANNING] & "?a=API_GenAddRecordForm&_fid_16=" & URLEncode ([Record ID#])& "&z=" & Rurl())


  • Author
  • Registered
  • April 10, 2019
Thanks for the reply! I will take a look at that as soon as I get a chance.

  • Author
  • Registered
  • April 11, 2019
I have a button just like that already. The problem I have is that when I change a record via grid edit on a report in another app, I want the button to appear on the form in that other app and I'm not sure how to make that happen.

I would like to help but I'm not understanding your question ...

  • Author
  • Registered
  • April 11, 2019
I tried including the field that the button is in on the report, but that doesn't work...


  • Author
  • Registered
  • April 11, 2019
In the form below I would like a button next to the report to appear when I change the status from "satisfactory" to "unsatisfactory" that allows me to create a new record in the app the report originates from. I have that button working in the other app, but have no idea how to create the same thing here.




You would need to hard code the table code if the table is in a different app.

Can you post the code for the button that is working in the other app , and also let me know the code for the table - all that string of numbers you see in the URL and we can adjust that to work here.


  • Author
  • Registered
  • April 11, 2019
the button:

URLRoot() & "db/" &[_DBID_DISCREPANCIES]& "?a=API_GenAddRecordForm&_fid_7=" & URLEncode([Serial Number])

table code:

bn539nsxk?a=er&rid=13&rl=sdy

and a picture of the table it is on just in case





try this

URLRoot() & "db/" & "bn539nsxk" & "?a=API_GenAddRecordForm&_fid_7=" & URLEncode([Serial Number])

But I do not know if you have a comparable field for [Serial Number] in the table where you are putting the button.

If you only want to show the button for certain statuses (ie Unstatisfactory), you can use a form rule


  • Author
  • Registered
  • April 11, 2019
There is not a comparable field for [serial number] on the table. The button on the NVG status log will only ever reference one serial number, while on the Flight Rest and Duty log there will always be multiple serial numbers. If I could put the button in the report, that might work but I haven't been successful trying to do so.

  • Author
  • Registered
  • April 11, 2019
It's primarily a UI thing as you can get to the record fairly easily from the referenced report, but there are a lot of users and it's easy for them to get off-track.

re: If I could put the button in the report, that might work but I haven't been successful trying to do so.

Why cant't you do the above.

  • Author
  • Registered
  • April 11, 2019
when I put it in the report it showed up as an unclickable url. I'll play with is some more and see if I can get it working.


  • Author
  • Registered
  • April 11, 2019
So, the button works in the report as long as it is on the NVG app, but when I reference it over to the FDR app the button is just text.

What do you mean by "It's just text"  What field type is this and if it is a URL formula type did you specify a label for the button?

  • Author
  • Registered
  • April 11, 2019
The field is a report link referencing the NVG app NVG status table where the button resides. When I look at a report including the URL field for the button on the NVG status app it works correctly.



  • Author
  • Registered
  • April 11, 2019
but when I use it in a report link it is just text



  • Author
  • Registered
  • April 11, 2019
When I click on the link in the Flight Duty and Rest table Quickbase says it is a report field and that it is not editable.

I'm not understanding the issue well enough from the screen shots to understand the issue.  Can you post a zoomed in screen shot of just the embedded repor in that last screen shot.

  • Author
  • Registered
  • April 11, 2019
Sure thing. Where it says Create New Discrepancy in the embedded report is the problem. If I look at that report in the NVG app that field is a Formula URL field which displays as a button and works correctly. Once I embed it, it no longer works.





  • Author
  • Registered
  • April 12, 2019
Okay one last question (about this specific topic). Is there a way to hide the button in the embedded report if the status is set to unsatisfactory?

Sure, just edit the code for the button like this

IF([Status] = "Unsatisfactory", .... insert button formula here)

I�m not sure if you want the button to appear when the status is equal unsatisfactory or the opposite, but the idea is to wrap the formula with an IF.