Forum Discussion

ShariMoehlenkam's avatar
ShariMoehlenkam
Qrew Trainee
7 years ago

Combo Primary Key

How do I set two fields in a table as a combo primary key, like in Access?  Thanks!

20 Replies

  • In fact, a little known secret is that you can.  Make a formula field to say hyphenate them together and then use the API_SetKeyField.

    You can just type the api call into the URL bar. 

    Post back if you don't know how to use the API guide and need help.
  • thank you!  I'm a brand new user to Quick Base, so I'm not familiar with how to make a hyphenate formula or use the API_SetKey Field.  Would you mind elaborating?
    • priyankagummulu's avatar
      priyankagummulu
      Qrew Trainee
      Please can you tell me how to create a combo primary key

      ------------------------------
      priyanka gummuluri
      ------------------------------
      • RyanStanford1's avatar
        RyanStanford1
        Qrew Captain
        You would need to create a formula Text field...

        in the formula section have something like:


        [Field A]&"|"&[Field B]

        You might need to add ToText() around the fields if they aren't text already... you then set this new formula field as the primary key of the table.

        ------------------------------
        Ryan Stanford
        ------------------------------
  • Shari,
    I have been tied up today and unable to respond. Can you contact me via the information on my website and I will walk you though the Steps. No charge :). QuickBaseCoach.com