Start a new topic

New function IF in 0.28 editor

can i now know how to use if function in new editor v0.28?

3 people like this idea

it is possible to know how the function if, as is, what is the grammar to use ...

@Looky_Xu You answer me ... I just want to understand how to use the if statement, not the serves elaborate explanation, only the exact use. Because they are still with the project now that I have the variables and the timer can do many things for the project MarlinKimbra if only I could use if. Then I wait quietly manuals and official explanations ...

Hi,all.Here is the HMI file about "if" judging grammar and "timer" "Variable" components.

view more about "if" click here:



1. Thank you for having implemented the "IF" function. It will make it easier to implement functions directly in the display without sending a lot of data to/from the MCU.

It also solves this older thread where I asked for the same feature: 

2. Typo:

In the Nextion Wiki you wrote 


It should be "!=" instead of "!==".

You also wrote "5. Greater than or equal to the judgment (> =)"

with space between ">" and "=".

3. I see that you use the term "Judging grammar" for the "IF" function. 

English is not my native language, so I may be wrong, but I think it's unusual to use the term "Judging grammar". 

It's more usual to call it "Conditional statements" or "Conditional expressions":

3 people like this

I AM....:(



Now it's written "1.3 equal to the judgment (=)".

It should be "==" instead of "=".


Thanks very much for doing this.

The engineers are not good at English..thus documents have to be translated by translator.

The translator is not an engineer... thus it's easily to make typo....

I asked the engineers to double-check the wiki, and fix any typo ASAP.

They should do such things periodical. 

Will you implement an ELSE? It would be awesome to have an if else change the button image. I have been able to switch the image once but you need an else to swap it back.


In the Nextion Wiki ( ) there is an example where they use "if(...==...)" / "if(...!=...)", which works like "if(...==...)" / "else" :

if, neither does it support else
t1.txt=”correct password”
if(t0.txt!=”123”)  // <<<<<<< = "else"
t1.txt=”incorrect password”

I am trying to set the button picture. So in my if statement: If (p0.pic == 1) { P0.pic=2; } But I cannot do: If(p0.pic==2) { P0.pic=1; } Because it will always just change. I guess I will need to put a temp variable in place...

1 person likes this
Login or Signup to post a comment