Characters 30 and 31 in the {tbl_alpha.address} field should only contain valid state abbreviations.
In order to be able to check and flag any potential errors in state abbreviations within the “{tbl_alpha.address} field, I am considering using the formula below.
//@State Abbreviation Check
if
Mid ({tbl_alpha.address},30 ,2) = "AL" or //Alabama AL
Mid ({tbl_alpha.address},30 ,2) = "AZ" or //Arizona AZ
Mid ({tbl_alpha.address},30 ,2) = "AR" or //Arkansas AR
Mid ({tbl_alpha.address},30 ,2) = "CA" //California CA
.
.
.
Mid ({tbl_alpha.address},30 ,2) = "WY" // Wyoming WY
then 1 else 0
However, is there a way I could do the same check by using a look up table that would contain one only field, that being the correct state abbreviations… {tbl_state.abbv}?
I actually added {tbl_state} to the report but of course I cannot link the {tbl_state.abbv} field to {tbl_alpha.address} field as they are not equivalent.
Any techniques that might allow the use of a look up table in this situation ? Thanks
In order to be able to check and flag any potential errors in state abbreviations within the “{tbl_alpha.address} field, I am considering using the formula below.
//@State Abbreviation Check
if
Mid ({tbl_alpha.address},30 ,2) = "AL" or //Alabama AL
Mid ({tbl_alpha.address},30 ,2) = "AZ" or //Arizona AZ
Mid ({tbl_alpha.address},30 ,2) = "AR" or //Arkansas AR
Mid ({tbl_alpha.address},30 ,2) = "CA" //California CA
.
.
.
Mid ({tbl_alpha.address},30 ,2) = "WY" // Wyoming WY
then 1 else 0
However, is there a way I could do the same check by using a look up table that would contain one only field, that being the correct state abbreviations… {tbl_state.abbv}?
I actually added {tbl_state} to the report but of course I cannot link the {tbl_state.abbv} field to {tbl_alpha.address} field as they are not equivalent.
Any techniques that might allow the use of a look up table in this situation ? Thanks