Creating an address block from different fields
Ninox Profile

I have a shipping table with different fields for address components (line 1-4, city, state, post code)

I can create a block showing the address without the if formulas, but if say line 3 and 4 are empty they show us line breaks, which I don't want, which is why I'm attempting this with an if then, but I feel like its not the way to go.

 

Current code:

 

let line1 := 'Shipping Address'.'Address Line 1';
let line2 := 'Shipping Address'.'Address Line 2';
let line3 := 'Shipping Address'.'Address Line 3';
let line4 := 'Shipping Address'.'Address Line 4';
let city := 'Shipping Address'.City;
let state := 'Shipping Address'.State;
let pc := 'Shipping Address'.'Post Code';
if line1 != null then
line1 + "
" and if line2 != null then
line2 + "
" and if line3 != null then
line3 + "
" and if line4 != null then
line4 + "
" and city + " " + state + "
" + pc
end
end
end
end

Ninox Profile

Given.. 

form

Here is the code for Address Label

theCode

Ninox Profile

Fantastic formula!  Thank you! Very userful!!

Ninox Profile

i need fonts to be Bold. is it possible?

Ninox Profile

i found bold thank you

Ninox Profile

I forgot to thank you back then Mconneen - works a treat, tah!

Ninox Profile

@Sarah... No worries.. that is what the forum is for.     There are also several Ninox Solution Partners that offer FREE YouTube channel (Ninox Learning) as well as pay as you go one on one training. 

Reply