Forum Discussion

JenniferJuhasz's avatar
JenniferJuhasz
Qrew Trainee
2 years ago

How to populate a field, if one parameter exists, but otherwise leave open for text entry?

Hi all,

I'm trying to work through a few different dilemmas that all stem together:

  1. I run a pipeline from a 'per interaction' form that staff fill out each time they complete something with a client.  The pipeline updates a 'Contacts table' from which we can update our mailchimp.
  2. the Pipeline is supposed to either ADD or Update records, depending on if the contact already exists or not.
  3. To prevent user error/typos - we made the contacts table look-up-able if they select a radio button that says if the contact is 'NEW' or 'Existing'
  4. If existing, they lookup (fid "email_address")
  5. If NEW, they input the email address (fid "New_Email_Address)
However, the Pipeline doesn't appear to be that smart - and I can only use one field to use for the pipeline If Then statements.  I can't say "When New Record Created, Look IF FID Email_Address exists, if Yes - update; if NO, look at FID New_Email Address - and create new record in contacts table.

So - I thought to myself, okay; I need to write a formula_email field that says:
IF [Was this interaction], "EXISTING", [email_address], ""

But, a) I keep getting a syntax error "expecting bool but found text"
and b) Is it even possible to write a formula field that either populates the field if a certain choice is made OR leaves it available for data entry if it doesn't, so that my pipeline can run off of it?

Thank you so much for your thoughts and help!

Jen


------------------------------
Jennifer Juhasz
FamilySmart
BC, Canada
------------------------------

1 Reply

  • MarkShnier__You's avatar
    MarkShnier__You
    Qrew #1 Challenger
    I'm not sure if I understand what you are trying to do, but you could use a Bulk Upsert to either add or update a contact record.  The "Upsert" will auto create if necessary else edit the existing record as long as the email address is set as being unique or better yet the Key to the contacts tavle.

    as for this statement

    However, the Pipeline doesn't appear to be that smart - and I can only use one field to use for the pipeline If Then statements.  I can't say "When New Record Created, Look IF FID Email_Address exists, if Yes - update; if NO, look at FID New_Email Address - and create new record in contacts table.

    In fact a Pipeline can have all kinds of crazy branching logic.  You insert a "condition" step. 



    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------