How to query record from table for a user using formula URL?

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

I'm trying to query the current table to retrieve the latest entry made by the current user and post it to a new form. I'm having a tough time comin up with the right formula to make this work so any help is appreciated (even suggestions on the formula names or expressions can also do). Thanks!

Photo of Chirag

Chirag

  • 10 Points

Posted 4 years ago

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

QuickBaseCoach App Dev./Training, Champion

  • 67,760 Points 50k badge 2x thumb
I'm not sure how complicated you are willing to go with this.

Let's start low tech.  If you run a report  for "My entries" filtered by where the [Record owner] is "the current user" and sort it by [Date Created] at the top.  The the user can View the top record to view and use the "More" button to add a similar record.

The next step in complexity would be to have the same report but had a button on the report to "Add Similar".  That is quite easy to do and I can help you with that.  That is what I recommend.


The next level of complexity would be to have a table of users and do a reverse relationship to float up the values of all the fields you need to have to add a new record up to the User record from the child record of data records which has the maximum record ID# - ie the most current record,..  Then make a URL formula URL button to click to create the new record or to put up an Add Record form with the fields partially filled in.  So the user would navigate to their own record and then click a button there to create the next similar record.


So those are the three choices you can go with.  Let me now how fancy you want to get with this.
Photo of Chirag

Chirag

  • 10 Points
will any of these options be available on a mobile interface too? The users will mostly use their Android or iPhone smartphones to make their entries.
Photo of Chirag

Chirag

  • 10 Points
I do have a table each for the users and the data records separately. However the crux here is to not ask the user to navigate to a custom report or record and choose a button to copy the fields to a new record.
The expected action is when the user makes a new entry, a button (formula URL field) should be available to take him to a new form with the values of his latest and last entry recorded in the new record.
The button on its own should query the last record of the user from the table, redirect to a new form page and populate the record. Hope I have conveyed it clearly. Thanks!
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 67,760 Points 50k badge 2x thumb
OK, well the question will be where this button can live.  Using native QuickBase it needs to live in a URL Formula field.  So for example it could live on a dashboard report with one record on it and 1 button on the record.  The report would show all records where the User is the current user - so just 1 record and the button would be labelled "Add Similar to last Entry".  Would that be OK for where the button would be?  That same 1 record report could also be the Table Home Page Report for this User table, so you could also get at it that way if you did not to waste your dashboard space for it.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 67,760 Points 50k badge 2x thumb
I think that what I described just above would also work in mobile.