Add a checkbox user defined field for each of the 50 states

Hi...

I want to create a new tab on the customer maintenance screen with each of the 50 states listed.  Each customer may have one or many of the states listed checked.  My question is will I need to create a user defined field for each state, which is tedious, or is there another way I can create 50 unique fields for each state?  I thought of a user defined table, but the customer has to have the ability to have more than one state selected.

Thank you for any thoughts...

B

  • 0

    What is the end goal? Analytics/Reporting? if yes, what do you need to report and how?

    If you really want a checkbox for each state, then you will need to create a UDF for each state since Custom Office won't let you create a listbox that can have multiple items selected.

    You could use a multi-line UDF with a length long enough to accommodate all 2 character state abbreviations plus new line characters for each state and the user would just enter the state abbreviation and then press ENTER to go to a new line and enter the next state abbreviation. If this is user friendly enough, you could enhance this with a drop-box UDF that is populated with the StateCode or StateName from SY_State then use either a post-validate script on the drop-box or a button script to read the value from the drop-box and then write the value to the multi-line UDF if it doesn't already exist within it.

    The single multi-line UDF would allow you to easily report all states the customer has been assigned in one field but may make it hard to report on specific data if you intend to be able to compare if a column representing a state is equal to Y or not as you would instead have to check the multi-line UDF for whether or not the state you want to check for exists in the value.