VOLUME XCIII 08/10/2021
This week we will look at how we can read out files from the file API and display their file names in a formula field in Ninox. It is possible to get the list of files for a record from a Ninox script with the files(record) function. However this will only be possible if you are in the same database as the file record whose file you would like to read. To get files from anywhere, you will need to use the API.
Next time we will take a look at how to download files to a user’s device using the API.
Be sure to attend our learning lab this Thursday at 12:00pm ET or 6:00pm CET where we’ll be hosting another open Q&A! Be sure to ask a bunch of questions so you can earn Gold Stars!
Did you know that Nioxus has built over 130 templates which are available to all Standard, Deluxe and Premier Nioxus members?
Nioxus has created nearly 100 videos and over 200 hours of content teaching you how to use and optimize Ninox, as well as our supplementary products, CalendarPLUS, ReportsPLUS and DocumentsPLUS!
if ‘Yes / No’ then (select Clients)[Sex = 1] else select Clients end This way I would get different values in the field. Or I could have a different order for my results: if ‘Yes / No’ then select Clients order by ‘Last Name’ else select Clients order by ‘First Name’ end
With a little trick actually we can change the value being displayed in the DCF/DMCF as well. We can set a switch (Yes/No field – can be hidden) on the Clients table as well. When we flip the Yes/No switch on our main table that would set all record value as well to the same. Now we can build the condition what field to display. In the Dynamic Value Name we can write a code. As example we will display First name if it’s on else display the last name:
if ‘Yes / No’ then ‘First Name’ else ‘Last Name’ end
So now we know how to filter records, organize them by different order or show different values. Of course, we can combine these 3 example codes above.
Setting values for DCF/DMCF:
Now we are able to set values by code as well to these fields. For DMCF we can either use the
‘Multiple choice (dynamic)’ := select Clients
(this would select all) or we can use filters on this as well
‘Multiple choice (dynamic)’ := select Clients[‘Yes / No’ = 1]
Also we can just simply assign an array of IDs to it
‘Multiple choice (dynamic)’ := [1,2,3]
For DCF it would be easier by just assigning a simple record
‘Choice (dynamic)’ := first(select Client)
Or assigning a number value
‘Choice (dynamic)’ := 1
With these features you can make your database very versatile.
All logos, trademarks and names are the protected property of Nioxus Corporation or their respective owners.
“Ninox,” “Ninox Database” and the blue Ninox owl eye logo are the property of Ninox Berlin and are used with permission.