Skip to main content
Question

Button to Create Record in Edit Mode

  • April 28, 2020
  • 0 replies
  • 310 views

Hello,

I'm trying to create a formula URL button that creates a new record and displays it in edit mode. Is this possible? If so, what would the code be?

------------------------------
Howard Fu
------------------------------
This topic has been closed for replies.

Forum|alt.badge.img+15
  • Registered
  • April 28, 2020
Howard,

You can accomplish this using API_GenAddRecordForm .  I suggest that you a Formula Rich Text.  I am assuming that you want to add a Child Record to the Parent that User is currently on.


// Images
var text IMG  =     "<img src=https://images.quickbase.com/si/48/045-lock.png>"; 

// URLs
var text URLGenAdd =
  URLRoot() & "db/" & Dbid() &
  "?a=API_GenAddRecordForm&_fid_XXX=" & URLEncode ([Record ID#])&
  "&z=" & Rurl();

// User Interface
"<a href=" & $URLGenAdd &  $IMG &  "</a>"


You need to make a few modifications
  • Pick an image that you want to display for this.  The one above is from the Quick Base Image Library.  The one I have included is of a Lock.
  • Edit the URLGenAdd variable replacing the XXX with number of the Related Parent Record.   You find this in the fields of the Child Table where your record is being created.

This will give you an image that the User clicks on, creating a record related to the one they were just on and being able to edit the values from the default add form.




------------------------------
Don Larson
Paasporter
Westlake OH
------------------------------