Skip to main content
Question

Formula "Self-Changing" to Something Else

  • April 21, 2026
  • 4 replies
  • 24 views

siliceous
Forum|alt.badge.img+10

Hi all,

I am having trouble with a nested “IF” formula which I believe is correct because when I enter it into the formula field, it is accepted and saved. However, when I then click on “Edit field” to view the formula, it has “self-changed” the formula to something else.

 

This is my original formula which the formula field is accepting:

IF({Transaction Status} = "Order Filled", IF({Transaction Type} = "Sell", ({Total Cryptocurrency Value USDT}-({Value per Buy Cryptocurrency USDT (from Linked Buy Transaction (From field: Linked Sell Transactions))} * {Amount of Cryptocurrency})) * 0.35), IF({Transaction Type} = "Buy", IF({Total Sell Transaction Values USDT (from Linked Sell Transactions from Transactions)} = {Total Cryptocurrency Value USDT}, ({Total Sell Transaction Values USDT (from Linked Sell Transactions from Transactions)})-{Total Cryptocurrency Value USDT}) * 0.35, IF({Total Sell Transaction Values USDT (from Linked Sell Transactions from Transactions)} < {Total Cryptocurrency Value USDT}), 'Trade in progress', IF({Total Sell Transaction Values USDT (from Linked Sell Transactions from Transactions)} > {Total Cryptocurrency Value USDT})), 'Miscalculation')

 

After I click “Save” and “Edit field” to view the formula, this is what comes up:

IF({Transaction Status} = "Order Filled", IF({Transaction Type} = "Sell", ({Total Cryptocurrency Value USDT}-({Value per Buy Cryptocurrency USDT (from Linked Buy Transaction (From field: Linked Sell Transactions))} * {Amount of Cryptocurrency})) * 0.35), IF({Transaction Type} = "Buy", IF({Total Sell Transaction Values USDT (from Linked Sell Transactions from Transactions)} = {Total Cryptocurrency Value USDT}, ({Total Sell Transaction Values USDT (from Linked Sell Transactions from Transactions)})-{Total Cryptocurrency Value USDT}) * 0.35, IF({Total Sell Transaction Values USDT (from Linked Sell Transactions from Transactions)} < {Total Cryptocurrency Value USDT}))) 

 

For some reason, it is automatically removing the last bits of the “if” statements which include the phrases ‘Trade in progress’ and ‘Miscalculation’ (italicised in the original formula above). The calculation it does for the “Sell” if statement is correct so it makes no sense why it is saving the formula then changing it to something else. Seems like some kind of Airtable bug.

Any help would be appreciated.

4 replies

Melissa_Hanson
Forum|alt.badge.img+4
  • Participating Frequently
  • April 22, 2026

Looks like you’ve just got some nesting issues with the IF statements. Airtable is attempting to correct so that’s why it changes. (Full disclosure - I asked ChatGPT.)


TheTimeSavingCo
Forum|alt.badge.img+32

Hm yeah, I would recommend adding line breaks and tabs to formulas to make them easier to debug

Here’s what your formula looks like:

IF(
{Transaction Status} = "Order Filled",
IF(
{Transaction Type} = "Sell",
(
{Total Cryptocurrency Value USDT} -
(
{Value per Buy Cryptocurrency USDT (from Linked Buy Transaction (From field: Linked Sell Transactions))} *
{Amount of Cryptocurrency}
)
) *
0.35
),
IF(
{Transaction Type} = "Buy",
IF(
{Total Sell Transaction Values USDT (from Linked Sell Transactions from Transactions)} = {Total Cryptocurrency Value USDT},
(
{Total Sell Transaction Values USDT (from Linked Sell Transactions from Transactions)}) -
{Total Cryptocurrency Value USDT}
) *
0.35,
IF(
{Total Sell Transaction Values USDT (from Linked Sell Transactions from Transactions)} < {Total Cryptocurrency Value USDT}),
'Trade in progress',
IF(
{Total Sell Transaction Values USDT (from Linked Sell Transactions from Transactions)} > {Total Cryptocurrency Value USDT}
)
),
'Miscalculation'
)

There are a couple of extra ‘)’s and the ‘Miscalculation’ line isn’t inside an ‘IF’, which seems like a typo?

Try this:

IF(
{Transaction Status} = "Order Filled",
IF(
{Transaction Type} = "Sell",
(
{Total Cryptocurrency Value USDT} -
(
{Value per Buy Cryptocurrency USDT (from Linked Buy Transaction (From field: Linked Sell Transactions))} *
{Amount of Cryptocurrency}
)
) *
0.35
),
IF(
{Transaction Type} = "Buy",
IF(
{Total Sell Transaction Values USDT (from Linked Sell Transactions from Transactions)} = {Total Cryptocurrency Value USDT},
(
{Total Sell Transaction Values USDT (from Linked Sell Transactions from Transactions)} -
{Total Cryptocurrency Value USDT}
) *
0.35,
IF(
{Total Sell Transaction Values USDT (from Linked Sell Transactions from Transactions)} < {Total Cryptocurrency Value USDT},
'Trade in progress',
IF(
{Total Sell Transaction Values USDT (from Linked Sell Transactions from Transactions)} > {Total Cryptocurrency Value USDT},
'Miscalculation'
)
)
)
)
)

 


siliceous
Forum|alt.badge.img+10
  • Author
  • Inspiring
  • April 22, 2026

@TheTimeSavingCo,

Thanks for your reply.

I copied and pasted your version of the code into the formula field, and this time it did not “self-change” the code but where there is supposed to be the text “Trade in progress” for a particular record, it doesn’t show anything. So I’m thinking there is still something wrong with the way the IF statements are nested, or Airtable still isn’t liking the formula. As I can see it, it looks fine to me.


TheTimeSavingCo
Forum|alt.badge.img+32

Hmm, your formula currently checks the following: 

{Total Sell Transaction Values USDT (from Linked Sell Transactions from Transactions)} = {Total Cryptocurrency Value USDT}

And if that’s true, it then does this:

IF(
{Total Sell Transaction Values USDT (from Linked Sell Transactions from Transactions)} < {Total Cryptocurrency Value USDT},
'Trade in progress',

And this means that ‘Trade in progress’ can never show up, right?