Print view: invoice form calculations
J

Hi, I'm new to Ninox. I've worked with Filemaker for many years and always found it fairly intuitive. I'm working on a mac and downloaded the Ninox app, using iCloud. 

I created a sample invoice form for my design business. What I can't figure out is how to create multi-line entries for items (services, reimbursements, etc.). I did a workaround with multi-line text fields but they don't always line up across and they don't calculate.

Also, is there a way to have fields 'slide up' if the field is empty? For example, in FMP, if the department field was empty, the address field would slide up.

Thank you

Screen Shot 2019-09-11 at 1.57.10 PM

Ninox Profile

For the slide up, see this thread : https://ninoxdb.de/en/forum/technical-help-5ab8fe445fe2b42b7dd39ee7/creating-an-address-block-from-different-fields-5cf46a93cdd5bd2503245b15?post=5d379bcbd907e27378256201&page=1

And if I understand you correctly i think this thread is for your first question : https://ninoxdb.de/en/forum/technical-help-5ab8fe445fe2b42b7dd39ee7/it-seems-to-be-impossible-to-include-a-view-field-in-the-print-lay-out-is-that-true-5d742dbf6b2136482db00b39?post=5d78da8942bb202de08d9f10&page=1

 

Ninox Profile

For your line items, you would be best creating a composition table under invoices. For each line item, you would add a new record.

The composition table would have fields like product code/description/qty/unit/unit price/sub-total etc

In your print layout, you can then have that show as a subtable, and use formulas to calculate the totals etc. You can even use the "sum" feature of the table to calculate the sub-total

Ninox Profile

Capture

Screenshot to give you an idea of layout in table

Ninox Profile

Capture

and print view

B

Hi,

The "Invoice" template contains an Invoice table that contains such "line items". Have you already tried this template? (Do you know where you can find it?)

-Bas

J

Thanks for all your suggestions. I'm working on them but it's slow going as I'm new to coding.

Bas, I'm working on the desktop version of Ninox on a mac and as far as I can tell, the invoice table is not available as described in the manual. It's only available online. So, I created my own based on a Filemaker Pro layout.

Steven, I tried your code for the slide-up address block but it only returns the CSZ (city, state, zip). Not sure what I'm doing wrong.

let t := this;
let s := "";
let a := [t.To, t.Department, t.Company, t.'Street Address'];
let p := "";
for i in range(0, 4) do
p := item(a, i);
if length(p) > 0 then
s := s + p + "
"
end
end;
CSZ

Someone else posted this code which gathers all fields in a block but does not slide-up.

if To then
To + "
"
else
null
end + if Department then
Department + "
"
end + if Company then
Company + "
"
else
null
end + if 'Street Address' then
'Street Address' + "
"
else
null
end + if CSZ then
CSZ + "
"
end

Any thoughts would be appreciated,

Joyce

B

Hi Joyce,

Could you please try the following for me? 

Open Ninox

Close the current database (if one would be open; I don't think it will...)

Go to the Menubar

Click on Database

Click on New Database...

You should see the following: Choose a template to start with

Click on "Invoice".

Decide where you would like to store this database (using iCloud or locally on your Mac) and finally click Create database.

 

This should open the example database?

 

Let me know how this goes. (We will help you with the formulas later on...)

 

-Bas

B

PS And a very warm welcome to Ninox too! It's a great product. Just hang in there while you overcome the initial learning curve; fairly steep indeed... No worries though; Ninox comes with an excellent support team and a "sharing is caring" community...

J

Ah ha! Thank you SO much, Bas! Not sure why I didn't see the invoice print preview when I first started. Hopefully, this has answered all my questions.

Regards,

Joyce

1 2
Reply