on 05-02-2017 7:52 PM
I need an address to be printed on a form. The address can be in the form of address, city, state, zip or the address field can contain a location/site (example a room number or building name)
With the formula I have below, if the address is a room number or building name, it prints a comma after it.Exampe:Building#10,
How do I prevent the comma from printing?
I want it to show commas when the address has address, city, state, zip and no comma when it prints the room/building
IF NOT ({Use_Location.PERMIT_NO}LIKE"00-??-???" )
THEN '<font color = "blue">'&' '+'<b>'&"Equipment can be used only at:" & '</b> </font>' &'<font size ="+2">' & '<b>'& {@Use addr is blank} + {@Use city is blank} +{@Use state is blank} + {@Use zip is blank} & '</font>' & '</b>'
I created these formulas.
@Use addr is blank
IF Isnull ({Use_Location.USE_ADDRESS})
Then " "
Else {Use_Location.USE_ADDRESS} +’,’ + “ “
@Use city is blank
IF Isnull ({Use_Location.USE_CITY})
Then " "
Else {Use_Location.USE_CITY} +’,’ + “ “
@Use state is blank
IF Isnull IF Isnull ({Use_Location.USE_STATE})
Then " "
Else {Use_Location.USE_STATE} +’,’ + “ “
@Use zip is blank
IF Isnull ({Use_Location.USE_ZIP)
Then " "
Else {Use_Location.USE_ZIP}
Hi Gina,
1. Create a formula called @address with this code:
stringvar addr := {@Use addr is blank} + {@Use city is blank} +{@Use state is blank} + {@Use zip is blank};
if right(addr,2) = ", " then
addr := Left(addr, Len(addr)-2)
else addr;
2. Modify the existing formula as:
IF NOT ({Use_Location.PERMIT_NO}LIKE"00-??-???" ) THEN
'<font color = "blue">'&' '+'<b>'&"Equipment can be used only at:" & '</b> </font>' &'<font size ="+2">' & '<b>'& {@address} & '</font>' & '</b>'
-Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.