Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
i have some property addresses which are all in separate fields.
i.e.
Property Name
Address 1
Address 2
Address 3
Address 4
Post Code
I need to display the address in a text box, so when a user selects an individual property, they see the details of that property, one of the details is a text box with the full address showing.
some of the address fields are not used for some of the properties
i.e.
property 1 might use all 5 fields
property 2 might only have address1 + 2 and post code
so adding these to a text box will cause missing (blank) lines between the first and last part of the address.
Can someone help with maybe using a nested if statement to check the fields are populated first? I have tried but i can't figure it out.
I have attached a sample.
Thanks
Please try your expression as :
=if(GetSelectedCount(Property)=1,
if(len(trim(Property)) > 0 ,Property&chr(10))&
if(len(trim([Address 1])) > 0 ,[Address 1]&chr(10))&
if(len(trim([Address 2])) > 0 ,[Address 2]&chr(10))&
if(len(trim([Address 3])) > 0 ,[Address 3]&chr(10))&
if(len(trim([Post Code])) > 0 ,[Post Code])
)
Please try your expression as :
=if(GetSelectedCount(Property)=1,
if(len(trim(Property)) > 0 ,Property&chr(10))&
if(len(trim([Address 1])) > 0 ,[Address 1]&chr(10))&
if(len(trim([Address 2])) > 0 ,[Address 2]&chr(10))&
if(len(trim([Address 3])) > 0 ,[Address 3]&chr(10))&
if(len(trim([Post Code])) > 0 ,[Post Code])
)
Try below
=if(GetSelectedCount(Property)=1,
Property & chr(13) &
if(len(TRIM([Address 1]))>0,[Address 1]&chr(13)) &
if(len(TRIM([Address 2]))>0,[Address 2]&chr(13)) &
if(len(TRIM([Address 3]))>0,[Address 3]&chr(13)) &
if(len(TRIM([Address 4]))>0,[Address 4]&chr(13)) &
[Post Code]
)