Skip to main content
Ninox-Website
Ninox-Documentation
How to enable Javascript
Sign Up
Log in
Learn & Share
Get help
Webinars
All topics
Contact
Privacy
Overview
Profile
John Halls
John_Halls
Somerset, England
649
92
1
Joined: Thu Feb 11 10:04:26 UTC 2021
Follow
My Posts
Latest Posts
Re: Calculate the percentage if this result is negative
This formula will return 1 if x is negative, and 0 if x is positive. You can then multiply it by your discount to return the discount or zero abs((sign(x)-1)/2) Regards John
John Halls
John_Halls
13 hrs ago
Get help
Reported - view
Re: Regarding 'history' issues.
Hi I would suggest adding a button with a script that updates the value of your text field to a different value and then puts the original value back in.…
John Halls
John_Halls
yesterday
1
Get help
Reported - view
Re: About the issue of allowing edits only when conditions are met…”
If you have a professional subscription a whole lot of power comes with the upgrade. The Readable if... and Writeable if... sections are available at a table and a field level. Regards John
John Halls
John_Halls
4 days ago
Get help
Reported - view
Re: Create new record with outside button
Hi @iliper LTD Can you use the duplicate() function. Sub-tables are duplicated with the relationship intact. let t := this; let oldData := last('Daily Result' order by Date); let newRec :…
John Halls
John_Halls
4 days ago
Get help
Reported - view
Re: Navigation Buttons
@Alan Cooke when does it come out Alan?
John Halls
John_Halls
6 days ago
Learn & Share
Reported - view
Re: The script don't work
If I am understanding this correctly and Categories is the table and Categories_> is the relationship you can just use Categories_>.Rate Either assign this to Rate by Categ or use is as is and don't…
John Halls
John_Halls
2 wk ago
Get help
Reported - view
Re: The script don't work
Also need 'Rate by Categ' = rate to be 'Rate by Categ' := rate
John Halls
John_Halls
2 wk ago
Get help
Reported - view
Re: The script don't work
Hi @Rafael You need to add a first() function in your select statement to return a record rather than an array let rate := first(select Categories where Category = catg).Rate; Regards John
John Halls
John_Halls
2 wk ago
Get help
Reported - view
Re: Time to create more work for myself...
Super impressive Fred. What sport is this?
John Halls
John_Halls
4 wk ago
Learn & Share
Reported - view
Re: Database Split
Hi Mel. Thank is a pain, that if you want to re-order the tabs you need to move all the fields as well.
John Halls
John_Halls
1 mth ago
Get help
Reported - view
Re: Database Split
Thanks Alan. I didn’t know that!
John Halls
John_Halls
1 mth ago
Get help
Reported - view
Re: Help with code to create non-repeating set of 10 numbers
@Fred Hi Fred, so good to see these techniques unfold. I have NEVER used range() before. It's such a powerful function. Unlike the for i from 0 to 10 do statement range() allows for descending…
John Halls
John_Halls
1 mth ago
Get help
Reported - view
Re: Database Split
My Pleasure Ian It is, in my view, good practice to add a tab layout field in the first position because it gives you far more control going forward. I always include another tab called 'Hidden' as…
John Halls
John_Halls
1 mth ago
1
Get help
Reported - view
Re: Help with code to create non-repeating set of 10 numbers
@MZ Ah, that's what I was trying to put together. It would have taken me days to put it so succinctly.
John Halls
John_Halls
1 mth ago
2
Get help
Reported - view
Re: Database Split
Hi Ian If I understand it correctly "Database" is a tab which was the first item in the Edit fields... section. This has now been moved down two places.…
John Halls
John_Halls
1 mth ago
1
Get help
Reported - view
Re: Help with code to create non-repeating set of 10 numbers
Hi Fred My reply to the previous post gives a non-repeating set of numbers between 0 and 9. It makes an array of 100 numbers but all of them are between 0 and 9.…
John Halls
John_Halls
1 mth ago
Get help
Reported - view
Re: Populate a field with values from a list
This works in the console let letterArray := ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J"]; let numArray := unique(for loop1 from 1 to 100 do [floor(random() * 10)] end); let Text :…
John Halls
John_Halls
1 mth ago
Get help
Reported - view
Re: Populate a field with values from a list
I know it's a bit of a sledgehammer to crack a nut but this gives and array of 0 to 9 randomly sorted let numArray := for loop1 from 1 to 100 do [floor(random() * 10)] end;…
John Halls
John_Halls
1 mth ago
1
Get help
Reported - view
Re: Regarding the issue of modifying a sub-table of a sub-table.
Where Script is a field to allow you to see the result of running your script instead of shown by an alert
John Halls
John_Halls
1 mth ago
Get help
Reported - view
Re: Issue with a script that does not display the expected value when two fields are equal
Hi Rafael It’s the same as the code I reduced in size in your last post. Take a look at it. I took out the if.. else part where you set a field to null.
John Halls
John_Halls
1 mth ago
Get help
Reported - view
Re: Regarding the issue of modifying a sub-table of a sub-table.
Fred is right, it isn't reccommened to put alerts in a loop. I would set a text or choice field so that you can see the results of running your script. If it was a choice field called Script it would…
John Halls
John_Halls
1 mth ago
Get help
Reported - view
Re: Regarding the issue of modifying a sub-table of a sub-table.
Hi Your codes goes from this for one product line let aa := this; for i from 0 to nb do let newRec := (create Code); newRec.(Products := aa) end To this for all product lines in a order for aa in…
John Halls
John_Halls
1 mth ago
Get help
Reported - view
Re: How to use code to remove extra information?
let cr := " "; join(split('Text 2', cr)[!= ""], cr)
John Halls
John_Halls
1 mth ago
5
Get help
Reported - view
Re: Some idea ?
@Rafael Fab. Always tricky when it's being coded outside of Ninox.
John Halls
John_Halls
1 mth ago
Get help
Reported - view
Re: Some idea ?
I think your code can be shorted to this, at least. Test it first though... let vDd := 'Add Data|Date'; if dialog(" Warning ", " ¿Confirm the Progress Update by Disciplines ? ", ["Yes",…
John Halls
John_Halls
1 mth ago
1
Get help
Reported - view
1
2
3
4
5
26
Ninox-Website
Ninox-Documentation
Overview
Learn & Share
Get help
Webinars
View all topics