I am currently using the following formula, to first search for an existing order in a table (by matching sender of an order and the order ID), and it creates new rows or modifies old ones no problem.
The issue is if a change to an existing order comes in and it contains only some of the info, so all the existing fields get overwritten with blanks - I’d like for it to make changes only if the parseJSON() returns a non-blank.
The formula in question:
AddOrModifyRows([orders table],Vendor=thisRow.Sender AND [Order ID] = ParseJSON(thisRow.[GPT output], “$.reference_id”)
,
[orders table].Vendor, thisRow.From,
[orders table].Type, ParseJSON(thisRow.[GPT output], “$.email_type”),
[orders table].Date, ParseJSON(thisRow.[GPT output], “$.pickup_datetime”),
[orders table].[Order ID], ParseJSON(thisRow.[GPT output], “$.reference_id”),
[orders table].[Client Name], ParseJSON(thisRow.[GPT output], “$.client_name”),
[orders table].[Flight number], ParseJSON(thisRow.[GPT output], “$.flight_number”),
[orders table].[Phone Number], ParseJSON(thisRow.[GPT output], “$.client_phone”),
[orders table].[Pickup address], ParseJSON(thisRow.[GPT output], “$.pickup_address”),
[orders table].Destination, ParseJSON(thisRow.[GPT output], “$.dropoff_address”),
[orders table].Notes, ParseJSON(thisRow.[GPT output], “$.client_notes”),
[orders table].Cash, ParseJSON(thisRow.[GPT output], “$.cash_payment”),
[orders table].[Passenger number], ParseJSON(thisRow.[GPT output], “$.passenger_count”),
[orders table].[Car type], ParseJSON(thisRow.[GPT output], “$.car_type”),
[orders table].Class, ParseJSON(thisRow.[GPT output], “$.car_class”)
)