Problems with IF Statements
I'm having lots of problems with code being lost after inputting it, then clicking OK. I don't understand why parts of the code are lost.
Here are some examples. Can anyone help with this?
With this test example, all is lost except "let":
Let text1 := City;
if Address2 = null then
if Country != null then
Country
End;
end
With this test example:
if Address2 = null then
Let text1 := Country;
if Country != null then text1; End;
else
Let text1 := City;
if State != null then
text1 := text1 + ", " + State
end;
if Zip != null then
text1 := text1 + " " + Zip
end;
text1
end;
This is all is all that remains, when clicking OK:
if Address2 = null then Let end
When entering this formula:
if Address2 = null then
if Country != null then Country end
Else
City + ", " + State + " " + Zip
end
this is the code after clicking OK; lines 3 and 4 were gone:
if Address2 = null then
if Country != null then Country end
end
When entering this formula:
if Address2 = null then
if Country != null then Country end
Else City + ", " + State + " " + Zip
end
After clicking OK, this is all that remains:
if Address2 = null then
if Country != null then Country end
end
2 replies
-
At a glance, it looks like part of the problem is your use of mixed case. All of Ninox commands/functions use Lower Camel Case so all of the single word commands/functions will be lower case like this, if-then-else or let. Multiple word functions will look like this, popupRecord(recordId).
-
Wow, I have never seen this before in any programming language that I have used. I never would have guessed that. I changed my expressions to lower case, and they work perfectly now!
I'm new to creating code in Ninox, and have spent many hours trying to get the code to work.
Thanks for your help; you saved me a lot of trouble! I really appreciate it.
Content aside
- 5 yrs agoLast active
- 2Replies
- 1804Views