Use previously entered field values when adding a new record

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered

I have two tables: Project Activities and Activities Dates History. On a form of Project Activities table I have a button "Add a new date". Is it possible to fill the dates fields with the dates at the moment and change only those I need to change? Because now after clicking "Add new" I get redirected to the blank page, which might not be ideal for those people, who, for example, wants to keep the planned end date and to modify only actual end date.

So more or less I'm looking for something like "Update and Save as a new record".

Thank you in advance,

Polina

Photo of Polina

Polina

  • 0 Points

Posted 3 years ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
The low tech method is to use the More button to Copy this record.  Oddly though, if you have a field like [Related Project] which is set to Read Only on the form, it will probably not copy.  If that work for you but you want to make it easier for your uses, you can make a formula URL button to mimic what that button does.  Lastly, you can make a URL formula button using the API_GenAddRecord Form to copy forward any fields you like and leave the user in the Add Record mode for them to Save.  maybe start with the More button and see if that works for you,.
Photo of Polina

Polina

  • 0 Points
Hi Mark, thanks, More button works for me, but I need to bring it to the form, since I need to add a new date from another table's form - Project Activity. Do you mind helping me to build a URL?

My conditions should be: copy the latest record where project activity is the same as on the current page.

So something like this, I guess, but this doesn't work, I get "Date not found" error.

URLRoot() & "db/" & [_DBID_ACTUAL_DATE_UPDATES] & "?a=GenCopyRecord&rid=[Maximum Status Evaluation Record ID#]"

where 6 is the FieldID of a "Related activity" field in Dates table.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
If you want to make a button on the Parent Project, then you will need to float up all the fields that you will need to populate into the new  Activities record to the Parent project record using a reverse relationship.  An easier solution is to put the copy button on the Activity records and show that button on the embedded table of Activities.
Photo of Polina

Polina

  • 0 Points
Hi Mark, I've already linked both tables with reversed relationships. My problem is the link now, how to copy the latest date only for the relevant activity?
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
Assuming that you have floated all the fields that you need for to make the child, up to the Parent record, then you would do this as a URL formula field on the Parent Record.

URLRoot() & "db/" & [_DBID_of the child table] & "?act=API_GenAddRecordForm"
& "&apptoken= xxxxxxxxxxxxx" // only required if you have application tokens enabled.  For simplicity you may want to turn that off in app properties

& "&_fid_xx=" & URLEncode([Record ID#]) // populate the field [Related PARENT] with the value of the Parent's Record ID#

& "&_fid_yy=" & URLEncode([some other field that needs to be populated])

& "&_fid_zz=" & URLEncode([yet some other field that needs to be populated])

So, you fill in the xx yy zz with the field ID number on the child record to be populated.
Photo of Polina

Polina

  • 0 Points
Many-many thanks for your help, Mark!
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,280 Points 50k badge 2x thumb
Glad to hear it worked for you. Thx for letting me know.