Hello,
I have a table that is synced with transactions from my bank account, but I need help with extracting data from a JSON string stored in the Notes (Long text) field.
An example of the JSON looks like this:
{
"transactionId": "2022142460021",
"endToEndId": "\/VS2501000545\/SS\/KS308",
"bookingDate": "2025-01-10",
"valueDate": "2025-01-10",
"transactionAmount": {
"amount": "-390.00",
"currency": "EUR"
},
"currencyExchange": [
{
"exchangeRate": "1.00000000",
"quotationDate": "2025-01-10"
}
],
"creditorAccount": {
"iban": "SK9111110000002303283006"
},
"debtorName": "COMPANY s.r.o.",
"debtorAccount": {
"iban": "SK8511000000002622224000",
"currency": "EUR"
},
"remittanceInformationUnstructured": "Platba faktury 2501000995",
"remittanceInformationStructured": "[{\\"reference\\": \\"2501000995\\", \\"referenceType\\": \\"VariableSymbol\\"}, {\\"reference\\": \\"308\\", \\"referenceType\\": \\"ConstantSymbol\\"}]",
"additionalInformation": "Platba 1111\/000000-2303283006",
"bankTransactionCode": "",
"creditorAgent": "UNCRSKBXXXX",
"debtorAgent": "TATRSKBXXXX",
"internalTransactionId": "",
"ext_nordigen_acc_id": "",
"pending": false
}
To identify payments in my Partner table using automation, I need to write formulas for two fields:
1.IBAN (but exclude mine, as for income, I am the creditor, and for outcome, I am the debtor).
2.Variable symbol.
I was using ChatGPT to help with the formulas:
For IBAN:
IF(
AND(
FIND("SK", {Notes}), // Ensure "SK" exists in the Notes field
NOT(FIND("SK8511000000002622224000", {Notes})) // Exclude your IBAN
),
REGEX_EXTRACT({Notes}, "(SK\\d{2}\\d{4}\\d{4}\\d{4}\\d{4}\\d{4})"), // Extract the first IBAN
BLANK() // Return blank if no IBAN is found or if your IBAN is found
)
For Variable symbol:
REGEX_EXTRACT({Notes}, "\\"reference\\": \\"(\\d+)\\".*\\"referenceType\\": \\"VariableSymbol\\"")
But neither of these formulas is working. 😐
Thank you!