Forum Discussion

DanteTognoli's avatar
DanteTognoli
Qrew Captain
4 years ago

API_GenAddRecordForm

I would like to autofill the current user into a user field on a new form using the GenAddRecordForm function but I can't find a command to do that. Is there a way to do so?

I am using the URL field below:

URLRoot() & "db/" & [_DBID_TABLE_1] &

"?a=API_GenAddRecordForm"

& "&_fid_14=" & User()

& "&_fid_18=" & URLEncode([Event ID])

------------------------------
Dante Tognoli
------------------------------

3 Replies

  • if its a suer field type that you are filling in then this should work

    & "&_fid_14=" & ToText(User())

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • DanteTognoli's avatar
      DanteTognoli
      Qrew Captain
      Thanks,

      That did not work, but I think I left out some critical information which explains it. The field is actually a related record and the proxy field is a user field. I am using related records because I also need to look up some other fields from the parent table based on user name.

      ------------------------------
      Dante Tognoli
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Qrew Champion

        Ya. There is a way.

        Make a new table with just 1record. it will be Recird ID # 1  Call the table Admin Current User. 

        Make a relationship to .all employees where 1 Admin current user has many employees  set the reference field to be a formula of 1  

        Make a summary field of the min Record  ID  subject the the filter that the userid is the current user  

        Now that table has the Recird ID # That you need  look it up to any table you need, with a nes relationship back to that single Record  

        ā€‹ā€‹

        ------------------------------
        Mark Shnier (YQC)
        Quick Base Solution Provider
        Your Quick Base Coach
        http://QuickBaseCoach.com
        mark.shnier@gmail.com
        ------------------------------