TeamDesk Knowledge Base & Support

   Home      FAQ      Forum      Idea Exchange      Ask a Question      My Stuff      Help   
  
Update records using web-to-record form
Is it possible to update existing records in a database using the EMAIL address as the 'key' (record identifier) field rather than the record id?
I need to integrate a database with a payments/donations webform. So when a donor places a new donation through the web but there is already a record for the donor in the database, I don't want to create a new donor record but to create a new donation record linked to the proper donor record using the donor's email as the identifier.
How can I set this up? Should we use the REST API rather than web-to-form?
ID
1474
Category
Integration/API
Author

Luison Lassala
Date Created
10/20/2021 5:22:33 AM
Date Updated
2/11/2023 5:08:18 AM
Comments
basenine 10/20/2021 6:52:50 AM
I would
Create a [date] field in the parent table
Create a workflow rule and action for each of the child tables
Each action will update the date in the parent table when there is a change in any of the child records
Create a view which filters the parent table records by the [date] field (show records for [date] plus 3 days)
Add that to the dashboard
basenine 10/20/2021 6:58:57 AM
Haha… I seriously did not have my glasses on…
This was a reply to your other post

Sorry 🤣
Luison Lassala 10/20/2021 7:42:33 AM
No worries, Brett - but would you have any idea on how to achieve this other request above?
basenine 10/20/2021 4:48:55 PM
I believe this is possible with Web2Record

This will help how to make a start:
https://www.teamdesk.net/help/7.3.1.aspx

It would take me an hour or so to configure and test (2hrs, if I'm honest...I know because I did exactly this 2 nights ago).
The Workshops example is updating an existing record via a W2R form.
It shows a URL is constructed using the WorkShopID and an email address.
An email is sent to the recipient with this URL in the body which pre fills the correct fields and in doing so, relates the records to each other.
Luison Lassala 10/21/2021 3:00:18 AM
Thanks Brett. I can follow the process for sending links to forms (personalised feedback form) to existing records (workshop participants).
But my client's use-case is for totally random donations via their website.

When someone (anyone who donates) generates a donation through the webform, how can we make TeamDesk recognise the newly created record (donation) as being linked to an existing parent record (donor in the db) when the email entered into the new donation webform matches the email of an already existing donor record?
basenine 10/21/2021 4:06:52 AM
You need this:
https://www.teamdesk.net/help/8.2.aspx

Multi relationships

Table A holds various fields, one of which is an email address
Likewise, Table B holds various fields…one of which is an email address
Create a multi relationship (not to be confused with multi reference), and use email=email in the match conditions

The web2record will create a record and as the email matches your donor record email, they will stick together
You can use multi relationships between Table A and Table A, too (I.e. between/to itself)
Luison Lassala 2/10/2023 10:42:15 AM
@Brett It is a while since you posted this solution but I've had no reason to use it until now.
It works quite well when there is a match between the two tables: Donors and Donations (I'm using Email + Firstname + Lastname as the match conditions).
But when there is no match I need TD to create a new Donor record, using the values in the 3 donor-specific fields in the new Donation record: Email, Firstname & Lastname.
I have created a Workflow Action in Donations table that creates a record in Donor table with the 3 fields as Assignments. And I have a Trigger that executes that Workflow Action when a new Donation record is created AND when the Text Formula column in Registration [Email, Firstname, Lastname] <> Donor's [Email, Firstname, Lastname]. But the trigger is not creating any new Donor records.
Any suggestions on how Donor records could be created when there is no match with new Registration details??
Luison Lassala 2/10/2023 11:15:24 AM
Or perhaps what I need to do is to set the Relation between Donors <<>> Donors, and the web2record form should be based on Donors table rather than Donations table??? Then activate a Workflow Action from Donors to create records in Donations table always??

Luison Lassala 2/11/2023 5:08:18 AM
Slava provided the solution - thanks!
Create a new Summary column in the new Relation: [Number of Matched Records] in DONORS<<>>DONATIONS
Use this summary column in the filter for the Trigger to create new DONOR record when new DONATION record is created (Record is Added) via Web2Record - filter is [Number of Matched Records]=0

Feedback
Back to Search Results