Webhooks

  • 0
  • 1
  • Question
  • Updated 9 months ago
  • In Progress
Can you do more than one if statement in an update webhook, instead of writing 4 webhooks doing an update for each field required?
Photo of Paul Vorster

Paul Vorster

  • 546 Points 500 badge 2x thumb

Posted 10 months ago

  • 0
  • 1
Photo of Evan Martinez

Evan Martinez, Community Manager

  • 8,744 Points 5k badge 2x thumb
Hi Paul,

Are you attempting to make the Webhook conditional so that it will fire off of any one of four fields changing and write over only that one field? Is that creating new records or is it updating existing records?
Photo of Paul Vorster

Paul Vorster

  • 546 Points 500 badge 2x thumb
Hi Evan, Thank you for your response, Yes I would like to make the webhook conditional...I am currently having four relationships between Table 1:Access Premises and Table 2: Wayleaves (Permissions), these relationships are presented in Table 1 as follows:
1. Wayleaves 1
2. Wayleaves 2
3. Wayleaves 3
4. Wayleaves 4

The user has the ability to select 1 or 2 or 3 or 4, or all of them at any given time...we want to capture the date when this field is selected by the user in the following fields:
1. Wayleaves 1 Selected Date
2. Wayleaves 2 Selected Date
3. Wayleaves 3 Selected Date
4. Wayleaves 4 Selected Date

We currently are doing this with 8 web hooks, 4 to update the date, and 4 to remove the date, if the record is de-selected...

We are trying to do all of this in 1 or 2 web hooks?