How to write if and else condition in webhook?

Hi,

I am trying to write if condition in my webhook.

the formula does not work when i use > <> <>

It works fine when i am using <> <> tag only.

Below are my formulas.
<<IF:[Invoice No.]=ANY(SELECT(Sheet2.1[Invoice No.],AND([Sewing Order ID]=[_ThisRow].[SGM D.O. to Sub Con],[Invoice No.]=[_ThisRow].[Invoice No.])))>>

โ€œIDโ€:"<<ANY(
SELECT(Sheet2.1[ID],
AND([Sewing Order ID]=[_ThisRow].[SGM D.O. to Sub Con],
[Invoice No.]=[_ThisRow].[Invoice No.])))>>",

โ€œSubConโ€:"<<[Invoice No.].[Supplier/SubCon]>>",

โ€œSewing Order IDโ€:"<<[SGM D.O. to Sub Con]>>",

โ€œReceive Item Descriptionโ€:"<<[Invoice No.].[Material]>>",

โ€œReceive Item HS Codeโ€:"<<[Invoice No.].[HS Code]>>",

โ€œInvoice No.โ€:"<<[Invoice No.]>>",

โ€œTotal Receive Quantityโ€:"<<SUM(
SELECT(Invoice Details[Quantity],
AND([SGM D.O. to Sub Con]=[_ThisRow].[SGM D.O. to Sub Con],
[Invoice No.]=[_ThisRow].[Invoice No.])))>>",

โ€œTotal Value of Serviceโ€:"<<SUM(
SELECT(Invoice Details[Value],
AND([SGM D.O. to Sub Con]=[_ThisRow].[SGM D.O. to Sub Con],
[Invoice No.]=[_ThisRow].[Invoice No.])))>>"

<ELSE:>
โ€œIDโ€:"<<UNIQUEID()>>",
โ€œSubConโ€:"<<[Invoice No.].[Supplier/SubCon]>>",
โ€œSewing Order IDโ€:"<<[SGM D.O. to Sub Con]>>",
โ€œReceive Item Descriptionโ€:"<<[Invoice No.].[Material]>>",
โ€œReceive Item HS Codeโ€:"<<[Invoice No.].[HS Code]>>",
โ€œInvoice No.โ€:"<<[Invoice No.]>>",
โ€œTotal Receive Quantityโ€:โ€œ1โ€,
โ€œTotal Value of Serviceโ€:"<<[Value]>>"
<>

0 1 426
1 REPLY 1

Instead of using < ELSE > use << EndIf >>

Top Labels in this Space