If() function always returns TRUE value regardless of condition

:bullseye: What is your goal?

I want to preserve existing “yes” values in Google Sheets when updating a row. If a cell already has “yes”, it should stay “yes” even when new data comes in as “no”.

:thinking: What is the problem & what have you tried?

I’m using Set Multiple Variables module with if() function.

My formula:
if(4.data.candidates[1].content.parts[1].text = “yes”; “yes”; “no”)

Problem: Even when the variable value is “no”, the if() function always returns “yes” (TRUE branch). The “no” branch never executes.

I have tried:

  • if() in Google Sheets module directly
  • if() in Set Variable module
  • Nested if()
  • contains() function
  • All return “yes” regardless of actual value

:clipboard: Error messages or input/output bundles

No error shown. Output is incorrect - always returns “yes” even when condition is FALSE.

Input variable value: no
Expected output: no
Actual output: yes

Hey there,

Can you show some screenshots of what the formula looks like inside the scrnario and what the incoming that looks like?

Hello,

Please show us your function.

" are unnecessary.

It should look like this:

Have a nice day,
Michal

I’ll add to what mszymkowiak said that if you want to keep existing data, even if it changes later, you can create a router with a filter that checks if the cell has a value and sends data to the appropriate branch accordingly.

Thanks for the suggestion, juan_burstein! Yes, we ended up implementing a router with a filter to check if the cell already has a value — works perfectly now. Appreciate the help!