Forum Discussion

JamesCarr's avatar
JamesCarr
Qrew Trainee
5 years ago

Action If Record Already Exists

I have a Meetups table and a Check Ins table related to each other, where the Meetups is the parent table.  I am looking to add the following functionality:

1)  If the Check Ins record does not exist, add the record to the table and send a notification (there's an email address field in another table that is also a parent to the Check Ins table).

2)  If the Check Ins record already exists, just send the notification (same email address as the #1 above).

I would like users to be able to click a custom designed button that will take the necessary action but, if the actions need to take place after clicking Save & Close (or whatever), I am okay with that.  I don't know if I need to create another relationship to get a count of the Check Ins and add that summary field to the Check Ins form, or if I should be using one of the API's like API_DoQueryCount and taking action based on that result, or what.  I am interested in the Formula Url and making it a button but, I don't fully understand the structure of the formula for doing this.  The URL Formula for Dummies app only explains but so much.  It would be great if someone gave a detailed example(s) of how to use he URL Formula for each API that is available.  QuickBase's instructions aren't that helpful in this regard.  

I hope what I am aiming to do is clear and that someone is able to help me figure out how to proceed.  Thanks in advance for anyone who attempts to assist.

------------------------------
James Carr
------------------------------
  • Update:  I have managed to get results using API_DoQuery and, from what it looks like, API_DoQueryCount.  My dilemma, though, is I am getting a link that is taking me to an XML page.  I don't know how to capture the resulting count from API_DoQueryCount in my Formula Url field.  The next step, of course, would be to Save and Send a notification or just simply send a notification depending on whether or not that value is greater than 0.  I am still open to taking a completely different direction from using the API_DoQueryCount call, if someone has a viable suggestion for me.   I will keep digging and will advise if I get any more results before someone else helps me produce a solution.  Thanks, again (and in advance), for any assistance.

    ------------------------------
    James Carr
    ------------------------------
    • MarkShnier__You's avatar
      MarkShnier__You
      Icon for Qrew Legend rankQrew Legend
      I am not understanding your desired workflow. Are you saying that the user is entering a check in record which may or may not be duplicate? Is that the beginning of this process?   For now leave aside all the technical stuff and it just explain your workflow.


      ------------------------------
      Mark Shnier (YQC)
      Quick Base Solution Provider
      Your Quick Base Coach
      http://QuickBaseCoach.com
      mark.shnier@gmail.com
      ------------------------------
      • JamesCarr's avatar
        JamesCarr
        Qrew Trainee
        Sorry.  I have to remember that I have to approach my questions differently.  Here's the situation:

        Member adds a Check In -> Check In does not already exist -> record is added and a notification is sent to the Member with details for accessing the virtual class

        Member comes back (for whatever reason) to Check In again because he/she needs the details again so....

        Member adds a Check In -> Check In already exists -> another record is NOT added; a notification is sent to the Member with details for accessing the virtual class

        ------------------------------
        James Carr
        ------------------------------