0
Reference of Functions and Language
Hi,
I understood the use of the select statement, but I need a confirmation, please...
1.
I can use the select statement with a not linked table too, from any table in the DB?
2.
The select statement run with data fields only, or with formula fields too?
3.
I have three tables; Table A, linked to Table B; Table B linked to Table C; I can use the select statement from the Table A to obtain the Table C data (the Tables A and C are not directed linked); is it correct?
4.
Can I receive a lot of example with a little DB, to understand better the "How to do", please?
Thanks for all
Best regards
Roberto
I understood the use of the select statement, but I need a confirmation, please...
1.
I can use the select statement with a not linked table too, from any table in the DB?
2.
The select statement run with data fields only, or with formula fields too?
3.
I have three tables; Table A, linked to Table B; Table B linked to Table C; I can use the select statement from the Table A to obtain the Table C data (the Tables A and C are not directed linked); is it correct?
4.
Can I receive a lot of example with a little DB, to understand better the "How to do", please?
Thanks for all
Best regards
Roberto
106 replies
-
Hi Jeni,
if 'Accepted' != null then ........
regards
Leo -
Thanks :-)
-
Hello - sorry, me again. I would like a new record to be created in a table when a box is checked on another table, and then that new record to be opened so you can complete the other fields. Is that possible? So, if someone ticks a box on the "interview" form, a new "placement" record opens which is linked to the interview (so pulls across the name and client details). I can send you the database if that helps?
-
If you could send me (support@ninoxdb.de) a copy of the Ninox database you are working on (Main menu -> "Save Archvie as...") I'm sure that I can find a solution to your problem.
Birger - Ninox Support -
Thanks Birger I have just sent it.
-
Hi...I posted a couple of questions a few days ago and only now am able to log back in. How do I find them and see if they have been answered?
-
Find your comment (and the answers) here:
http://manual.ninoxdb.de/en/formulas-and-calculations/ -
Thanks Birger. Is there some way in general to find comments and answers that I post...even if several days have gone by?
-
Well - I don't know :-) Aren't there email notifications?
Birger - Ninox Support -
Hi. I want to loop through some records, and detect when some value is different from the previous record.
In this example, I just loop through an array of numbers, trying to detect when a number isn't the same as the previous:
let prev := 0;
"start";
for a in [1, 2, 3, 3, 3, 4, 4, 5, 5, 5, 6, 6] do
if a = prev then
"same"
else
(let prev := a;
"different")
end
The result is:
"different,different,different,different,different,different,different,different,different,different,different,different"
It looks to me like the 'prev' variable must have a local scope inside the loop.
How can I get the 'prev' inside the for loop to be the same scope as the 'prev' outside the loop?
Thank you for your help!
(Tim) -
Try it like this:
–––
var prev := 0;
"start";
for a in [1, 2, 3, 3, 3, 4, 4, 5, 5, 5, 6, 6] do
if a = prev then
(prev := a;
"same")
else
(prev := a;
"different")
end
–––
Birger - Ninox Support -
That works! Thank you!
Can you explain the difference between "var" and "let"?
Also, can you explain when and why to leave out "var" or "let", as in line 5 and 8 in your example?
Thanks again!
(Tim) -
var is for variables, let for constants (though, due to a bug in the most recent version, also let-values can be changed).
The first var declares the variable, the second assignment leaves out the var, since it has already been declared. -
Ah, yes. For declarations, like in Swift.
So it wasn't a scoping problem, it was that I was getting a new variable declaration (of the same name) every time.
Thanks! -
Nope...I have to keep a log of questions that I post and then check to see if there is a response. I also have to keep track of where...which section of the manual... I post things or I lose track of them.
-
Hi, again. I'm really having fun with the scripting features of Ninox!
I found the list of new features in Ninox 2.2.0 and would like to know more about the new loop features, especially the 'while' loop. Is that covered in the documentation somewhere or can you provide a couple of examples here?
Thanks!
(Tim) -
A question about user-defined functions:
How can I pass a record as an argument?
-- Start example
function myfunc(somerecord: ) do
somerecord.somefield := "some value"
end
myfunc(first(select sometable))
-- End example
Thanks!
(Tim) -
Sorry, I messed up my example a little.
The question is how do I specify the argument type when I want to pass a record to the function? -
Try it like this:
–––
function hello(name: text) do
"Hello " + name + "!"
end
–––
Possible values are "text", "number", "boolean", "date", "datetime"
Birger - Ninox Support -
Ah. So I can't pass a record as an argument to a function. I hope that is on a list of future enhancements.
Thank you for the information.
(Tim) -
Hi Birger,
Did you happen to find a solution for Jeni's request? I would also like to do the same thing.
I need to be able to pick multiple sizes from a multiple choice field which then creates a new record for each selection (size) in my "Cost table" which is referenced.
Thanks -
Hi,
How can we display a "Are you sure?" popup before deleting a record?
Thanks for a great product!
Rob -
The popup alert function does not allow transactions after clicking OK.
You can write a ' quasi alert '
https://www.dropbox.com/s/hztqiuo8lrg19x2/Deleting.ninox?dl=0
regards
Leo -
Hi Rob,
we put this feature to confirm deletion on the change request list.
Best regards,
Alex
Content aside
- 6 yrs agoLast active
- 106Replies
- 35923Views