March 16, 200619 yr I need to format a field to display a list of codes based on a set of checkboxes in another field. For example, field 1 is called "Tests requested." The user selects the corresponding checkboxes. A related table has tests in one field, and the test codes in another field. I want to pull the test codes from the related table and concatenate them together for printing purposes in another field (Test Code Summary). User selects Purity, Germination and Noxious Weed exam. Corresponding codes are PUR, GER and NOX. I want Test Code Summary to display the text "PUR, GER, NOX" I've tried everything I can think of, but I end up with only the field code from the first selected checkbox.
March 16, 200619 yr I am unsure of your join field here. Is it your checkbox? I believe the ValueListItems() function could work for you. Do you have a relationship from the checkbox to its corresponding Table Code field? You need a value list of your test codes. Then a calculation (text) in your main table with this should work: Substitute ( ValueListItems ( Get(FileName ) ; "Test Codes" ) ; ¶ ; ", " ) But I am still unclear on your structure and until I see that portion clearly, I can't give a solid answer. I would think the checkbox should contain the CODES instead. And with vs. 8's new ability to display description but implant the code, it would work wonderfully. Then simply converting your checkbox field (using calc similar to above) would work perfectly. LaRetta
March 16, 200619 yr Author Yay! It worked! I had to change the field type to calculation (vs. text field w/calculation) and then set it to unstored. Thanks, LaRetta.
Create an account or sign in to comment