Skip to main content
September 22, 2022
Solved

Getting error while using 3 nested if functions - Any changes i need to change ?

  • September 22, 2022
  • 2 replies
  • 0 views

Here is my code 

I understand that error i how can i use the same nested if without error?

    Best answer by harshitb6843

    You have some unnecessary brackets in your code. Adding the correct syntax below. 

    if(
      local!val=1,
      35,
      if(
        local!val=2,
        45,
        if(
          local!val=3,
          55,
          65
        )
      )
    )

    Anyway, I would recommend using a!match() now instead of nested if(). 

    2 replies

    harshitb6843
    September 22, 2022

    You have some unnecessary brackets in your code. Adding the correct syntax below. 

    if(
      local!val=1,
      35,
      if(
        local!val=2,
        45,
        if(
          local!val=3,
          55,
          65
        )
      )
    )

    Anyway, I would recommend using a!match() now instead of nested if(). 

    September 22, 2022

    It works as expected , Thank you harshit 

    Great Job