Forum Discussion

ChrisFaye1's avatar
ChrisFaye1
Qrew Cadet
5 years ago

Formula URL - Add Record fid's

Hi All, 

Quick question as this would really speed up some work - When creating a formula URL (button) to add a new record in another table and copy the following fields, do you need to use the actual field name for the source data in the code or can you go from fid to fid?

Ex (that isn't working):
Question: & "&_fid_123=fid_62"
         VS
Standard: & "&_fid_123=" & [Name]


Thanks!



------------------------------
Chris
------------------------------

9 Replies

  • I don't think there is a simple (or native) way to do what you're looking for.

    I have two recommendations to speed up your work.

    The first option would be to create a set of variables that reference all the fields you might be using in a particular table then paste use those variables in the beginning of every formula.

    Example:

    var text FIELDONE = [Field 1];
    var text FIELDTWO = [Field 2];
    ...
    var text FIELDFOURTWO = [Field 42];

    Then you could do something like this in your formulas:
    & "&_fid_42=" & $FIELDFOURTWO

    Of course, without the use of numbers in variables it could get a little messy.

    A second option would be to add the field number to the field's name such as [Status 62].

    Then when writing the formula you could quickly add it with the CTRL+Shift+Space shortcut to access all of the fields & functions then type the field ID to quickly search and choose from the menu that pops up.

    Let me know if either of these are helpful ๐Ÿ‘๐Ÿ˜€
    โ€“Sharon



    ------------------------------
    Sharon Faust (QuickBaseJunkie.com)
    Founder, Quick Base Junkie
    https://quickbasejunkie.com
    ------------------------------
    • AustinK's avatar
      AustinK
      Qrew Commander
      What browser do you use? On Chrome 79 and ctrl+shift+space does nothing for me. I tried in many different formula fields including a formula url. I am going to guess you use a different browser as your blank lines in the formula are all numbered and at least for me in Chrome only the lines I've filled out are numbered.

      Are there any steps other than the ones you mentioned? Just hit that key combination while the text cursor is in the box and something should popup?
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        Ms. Junkie's tip worked for me on Chrome on a Mac. It was a great tip.

        ------------------------------
        Mark Shnier (YQC)
        Quick Base Solution Provider
        Your Quick Base Coach
        http://QuickBaseCoach.com
        mark.shnier@gmail.com
        ------------------------------
  • There is no native way to do this within QB that I could find.  Sharon's CTRL+Shift+Space tip is the best option on time savings when writing the formulas. Another option is to use Automations as well, it takes away most of the typing in formula writing in creating new records. I have replaced almost all of my buttons to create new records with automations.

    ------------------------------
    jason johnson
    ------------------------------
    • ChrisFaye1's avatar
      ChrisFaye1
      Qrew Cadet
      I figured as much, but I wanted to be sure there wasn't a quicker way. 

      Thanks, Everyone!

      ------------------------------
      Chris
      ------------------------------
    • Quick_BaseJunki's avatar
      Quick_BaseJunki
      Qrew Captain
      Hi Jason, 

      I'm glad you found the CTRL+Shift+Space option helpful. Automations can be a good option too, but there are often reasons to choose Buttons over Automations and vice versa.

      I created a video breaking down the differences to consider.
      https://www.quickbasejunkie.com/automations-vs-apis

      ------------------------------
      Sharon Faust (QuickBaseJunkie.com)
      Founder, Quick Base Junkie
      https://quickbasejunkie.com
      ------------------------------
  • DonLarson's avatar
    DonLarson
    Qrew Commander
    Chris,

    An interesting idea. 

    I tested it inside of the same table with an API_EditRecord and it would not write the value from one FID to another FID using  just the field ID.

    Perhaps someone else knows a syntax where it will work without using the field name.

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