How can I repopulate table form fields with previous entry made by a user?

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

I'm trying to add a feature for my table form. There are users who make multiple entries to the table on a daily basis and therefore values for some fields usually remain the same for a user. I'm trying to add a checkbox or a button that can repopulate some of the fields based on the last entry made by the user. I looked into the dynamic form 'rules' or 'actions' and couldn't find a way to add a customizable action nor does the formula seem like a useful route. Is there a way to get this done? I'm wondering if this needs to be done through javascript but if so will I be able to integrate the code with the table form page?

Photo of Chirag

Chirag

  • 10 Points

Posted 4 years ago

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

QuickBaseCoach App Dev./Training, Champion

  • 62,994 Points 50k badge 2x thumb
There are a variety of ways to do this, but let's start with the easiest.

You can make a formula URL field button called ADD Similar which will simply do what the "Copy this Record" does using the More menu when viewing a record.

URLRoot() & "db/" & Dbid() & "?a=GenCopyRecord&rid=" & ToText([Record ID#])

You set each field's properties as to if it should be copied when using this feature.

You could have a report, perhaps even these users' Dashboard Report, for My Recent Records, which is filtered by where the record owner is the current user, most recently created records first. So they would look at a recent record, click the add similar button in the report and just fill in the missing fields were set not to carry over.
Photo of Chirag

Chirag

  • 10 Points
Thank you for your response but the above formula didn't seem to work for me. After selecting the newly created field, I got the 'Entry not found' error. I did set the field properties I require to be allowed to be copied. Am I missing something here? Should I be replacing part of the formula with something relevant to my application? Also I'm trying to add this feature such that the user does not have to navigate to a different page or report to choose the record he wants to copy the fields from, just the values from the 'previous entry' would be sufficient as its more about the time spent on an entry than the convenience of choosing the fields. The user would generally be making multiple entries quickly.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 62,994 Points 50k badge 2x thumb
Can you confirm that when you clicked this button you were sitting on an existing record in View mode, and also can you post the exact error message?
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 29,924 Points 20k badge 2x thumb
In this demo new records  will have the City and State copied from the most recently created record but leave the Name field empty:

Here We Go Again
https://haversineconsulting.quickbase.com/db/bj6pt7476?a=q&qid=1

The demo has been created to allow you to add records.

The query would have to be modified slightly to grab the most recently created record by the current user but there is no point in putting that logic into a public demo as I have to allow everyone on the internet the ability to add records.

Pastie Database
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=443


Notes:

I entered Debbie Harry of Miami Florida as the first record as I was listening to Blondie. If you have any questions or need any help please feel free to call me using the information in my profile. Enjoy ...

Blondie - Call Me
https://www.youtube.com/watch?v=StKVS0eI85I