Creating 2 records (in two different apps) using only 1 form

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered
I have two applications, project management & calendar app. I want to be able to give users the ability to create a project in the PM app and have that automatically create a new record in my calendar app. How can I do that? 
Photo of Emily

Emily

  • 0 Points

Posted 3 years ago

  • 0
  • 1
This can be done with a new feature called Webhooks, but the setup is a bit complicated for new users. You can look for help on that topic here http://help.quickbase.com/user-assistance/Default.html#about_webhooks.html

You will probably need assistance unless you are very familiar with APIs as this is an advanced feature. If you really want this and have budget for an hour of consulting time, I can set this up with you in a GoToMeeting doing/training session
Photo of Emily

Emily

  • 0 Points
Are there any other out of the box solutions that QB provides? I'm not looking for a super automated solution and I've read in the community about how some users were able to create a button in the parent table (which would be my project management app) which will then create the record in the child table (calendar app) through a cross-app relationship.

Would that work or my purpose? And can you help explore that solution with me within this forum?
Yes, it is much less complicated to Create a button for a user to push to create a record, than to have it created  automatically.

I don't mind helping you create that button.  As background info, I have put an app in the Exchange called URL formula buttons for dummies.

To make such a button, you will need to know:
The names of the fields in your Parent table (Project management)
The real name of the table in the other table (this is the name like _DBID_ CALENDAR which is seen in the advanced properties of the child table .  
We will also need to know if the child table is in the same app or a different app.

We also need to know the field ID#s that need to be populated.

Lastly, we need ot know if you want to prepopulate the calendar record and leave the user in edit mode, or do we want to actually create and save the record.   Either way we also need to decide where to leave the user after they push the button to create the record.  ie do we leave them in Project Management Parent or on the calendar entry.
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,264 Points 20k badge 2x thumb
Needless to say you can do this easily with script using a feature called FormData. FormData basically extracts all the names and values out of a form into a FormData object which can be further manipulated and submitted with script. It is easy to post the FormData multiple times (100 times if you want), alter the values of form names or add new form elements. And FormData is not limited to data entry forms you create with the form builder interface - it can also manipulate administrative forms. Users sometimes ask if they can automatically create forms based on existing form, transfer fields between forms etc. All of this is easy to do with script and FormData. Here is some info on FormData:

FormData on MDN
The FormData interface provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using the XMLHttpRequest.send() method. It uses the same format a form would use if the encoding type were set to "multipart/form-data".
https://developer.mozilla.org/en-US/docs/Web/API/FormData

If you are interested in using this technique feel free to contact me off-world using the information in my profile:

https://quickbase-community.intuit.com/users/513/
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,264 Points 20k badge 2x thumb
I was unable to create two records with one form but I was able to create three records with one form. Visit this page and enter a name and a secret number and then click save:

Triplicate Forms
https://haversineconsulting.quickbase.com/db/bmb84cqj4?a=nwr


You should then be redirected to the application dashboard where you can see your name and secret number has been added to all three tables. You can't do this magic with formulas and loopy reverse relationships - you have to use script.

Pastie Database
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=532